Files
linuxkit/projects/miragesdk/examples/https-unikernel/src/store_main.ml
Thomas Leonard c7c33b9a56 Add example https-unikernel
This is mainly a test for the Cap'n'Proto RPC support.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
2017-06-07 16:34:59 +01:00

22 lines
475 B
OCaml

open Lwt.Infix
let () = Common.init_logging ()
let main store_socket =
Lwt_main.run begin
Lwt_switch.with_switch @@ fun switch ->
Store.service () >>= fun store ->
Common.listen ~switch ~offer:store store_socket
end
open Cmdliner
let store =
let doc = "The database store to serve" in
Arg.(required @@ pos 0 (some string) None @@ info ~doc ~docv:"STORE" [])
let cmd =
Term.(const main $ store), Term.info "store"
let () = Term.(exit @@ eval cmd)