Files
linuxkit/projects/miragesdk/examples/https-unikernel/src/test_store.py
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

11 lines
277 B
Python

import capnp
import capnp
import proto_capnp
import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
s.connect('/tmp/store.sock')
client = capnp.TwoPartyClient(s)
store = client.bootstrap().cast_as(proto_capnp.Store)
r = store.get(['index.html'])
print r.wait()