Files
linuxkit/projects/miragesdk/examples/https-unikernel/src/store_main.ml
Thomas Leonard 86b4f01e17 Update https-unikernel to released capnp-rpc 0.1 API
Also, separate out RPC encoding from application logic.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
2017-08-15 14:16:35 +01:00

23 lines
510 B
OCaml

(** Run the Store service as a stand-alone Unix process. *)
open Lwt.Infix
let () = Logging.init ()
let main store_socket =
Lwt_main.run begin
Store.local () >>= fun store ->
Capnp_rpc_unix.serve ~offer:store store_socket
end
open Cmdliner
let store =
let doc = "The database store to serve" in
Arg.(required @@ pos 0 (some Capnp_rpc_unix.Listen_address.conv) None @@ info ~doc ~docv:"STORE" [])
let cmd =
Term.(const main $ store), Term.info "store"
let () = Term.(exit @@ eval cmd)