nvflare.fuel.utils.grpc_utils module¶
- create_channel(server_addr, grpc_options, ready_timeout: float, test_only: bool)[source]¶
Create gRPC channel and waits for the server to be ready
- Parameters:
server_addr – the gRPC server address to connect to
grpc_options – gRPC client connection options
ready_timeout – how long to wait for the server to be ready
test_only – whether for testing the server readiness only
Returns: the gRPC channel created. Bit if test_only, the channel is closed and returns None.
If the server does not become ready within ready_timeout, the RuntimeError exception will raise.