mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-04 20:23:51 +00:00
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>
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
(** Run the Store service as a stand-alone Unix process. *)
|
||||
|
||||
open Lwt.Infix
|
||||
|
||||
let () = Common.init_logging ()
|
||||
let () = Logging.init ()
|
||||
|
||||
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
|
||||
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 string) None @@ info ~doc ~docv:"STORE" [])
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user