Update https-unikernel example to latest API

Also, stop static linking for now, as it generates a lot of warnings
with glibc.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
This commit is contained in:
Thomas Leonard
2017-07-07 14:36:09 +01:00
parent 76509e34a2
commit 815f5599fc
9 changed files with 41 additions and 53 deletions

View File

@@ -21,15 +21,15 @@ let () =
begin
Store.service () >>= fun service ->
let tags = Logs.Tag.add Common.Actor.tag (`Green, "Store ") Logs.Tag.empty in
let _ : CapTP.t = CapTP.of_endpoint ~offer:service ~tags ~switch store_to_http in
let _ : CapTP.t = CapTP.connect ~offer:service ~tags ~switch store_to_http in
Lwt.return ()
end
>>= fun () ->
begin
let tags = Logs.Tag.add Common.Actor.tag (`Red, "HTTP ") Logs.Tag.empty in
let store = CapTP.bootstrap (CapTP.of_endpoint ~tags ~switch http_to_store) in
let store = CapTP.bootstrap (CapTP.connect ~tags ~switch http_to_store) in
let service = Http_server.service store in
let _ : CapTP.t = CapTP.of_endpoint ~offer:service ~tags ~switch http_to_tls in
let _ : CapTP.t = CapTP.connect ~offer:service ~tags ~switch http_to_tls in
Lwt.return ()
end
>>= fun () ->