[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Logging, Flows and Irmin



> Secondly; The stack uses Sexps to produce traces and they are now
> stored with Irmin/Git [1] (please be gentle, this is my first foray
> into Irmin :) ). Since we plan to spin up multiple instances of this
> it would be better to send Sexps to an Irmin daemon that manages the
> storage. Could somebody point me to a snippet of code to get started
> with this?

You have different ways to do this. The simplest one is to push to a remote Git 
repository:

```
let remote = IrminRemote.uri <git-uri> in
Store.Sync.push t remote
```

This currently only works with the Git Unix backend, though, ie. you need to 
`open Irmin_unix` in your file and link with `irmin.unix`.

An other way is to create a remote Irmin daemon and push to it using:

```
let module R = IrminCRUD.Make (...)(struct let uri = <remote-uri> end) in
R.create () >>= fun r ->
let remote = IrminRemote.store (module R) r in
Store.Sync.push t remote
```

This will work with any backends, but will be quite slow (ie. using JSON over 
HTTP).

Hope this helps,
Thomas


> 
> Thanks,
> David
> 
> [1] https://github.com/mirleft/tls-demo-server/blob/master/unikernel.ml#L118
> 
> _______________________________________________
> MirageOS-devel mailing list
> MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.