The client.py module#

Summary#

SpeosClient

Wraps a speos gRPC connection.

wait_until_healthy

Wait until a channel is healthy before returning.

default_docker_channel

Create default transport options for docker on CI.

default_local_channel

Create default transport options, WNUA on Windows, UDS on Linux.

Description#

Provides a wrapped abstraction of the gRPC proto API definition and stubs.

Module detail#

client.wait_until_healthy(channel, timeout)#

Wait until a channel is healthy before returning.

Parameters:
channelgrpc.Channel

Channel to wait until established and healthy.

timeoutfloat

Timeout in seconds. One attempt will be made each 100 milliseconds until the timeout is exceeded.

Raises:
TimeoutError

Raised when the total elapsed time exceeds timeout.

client.default_docker_channel(host=DEFAULT_HOST, port=DEFAULT_PORT, message_size=MAX_CLIENT_MESSAGE_SIZE)#

Create default transport options for docker on CI.

client.default_local_channel(port=DEFAULT_PORT, message_size=MAX_CLIENT_MESSAGE_SIZE)#

Create default transport options, WNUA on Windows, UDS on Linux.