mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-06 20:47:22 +00:00
This is mainly a test for the Cap'n'Proto RPC support. Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
24 lines
627 B
OCaml
24 lines
627 B
OCaml
let () = Common.init_logging ()
|
|
|
|
let main http_socket port =
|
|
Lwt_main.run begin
|
|
Lwt_switch.with_switch @@ fun switch ->
|
|
let http_service = Common.connect ~switch http_socket in
|
|
Tls_terminator.run ~http_service ~port
|
|
end
|
|
|
|
open Cmdliner
|
|
|
|
let http =
|
|
let doc = "The HTTP service to use" in
|
|
Arg.(required @@ opt (some string) None @@ info ~doc ~docv:"HTTP" ["http"])
|
|
|
|
let tls =
|
|
let doc = "The TLS port on which to listen for incoming connections" in
|
|
Arg.(value @@ opt int 8443 @@ info ~doc ~docv:"PORT" ["port"])
|
|
|
|
let cmd =
|
|
Term.(const main $ http $ tls), Term.info "tls"
|
|
|
|
let () = Term.(exit @@ eval cmd)
|