buildgrid.server.client.channel module
- buildgrid.server.client.channel.setup_channel(remote_url: str, auth_token: str | None = None, auth_token_refresh_seconds: int | None = None, client_key: str | None = None, client_cert: str | None = None, server_cert: str | None = None, action_id: str | None = None, tool_invocation_id: str | None = None, correlated_invocations_id: str | None = None, asynchronous: bool = False, timeout: float | None = None) tuple[grpc.Channel, tuple[str | None, ...]]
Creates a new gRPC client communication chanel.
If remote_url does not point to a socket and does not specify a port number, defaults 50051.
- Parameters:
remote_url (str) – URL for the remote, including protocol and, if not a Unix domain socket, a port.
auth_token (str) – Authorization token file path.
auth_token_refresh_seconds (int) – Time in seconds to read the authorization token again from file
server_cert (str) – TLS certificate chain file path.
client_key (str) – TLS root certificate file path.
client_cert (str) – TLS private key file path.
action_id (str) – Action identifier to which the request belongs to.
tool_invocation_id (str) – Identifier for a related group of Actions.
correlated_invocations_id (str) – Identifier that ties invocations together.
timeout (float) – Request timeout in seconds.
- Returns:
- Client Channel to be used in order to access the server
at remote_url.
- Return type:
Channel
- Raises:
InvalidArgumentError – On any input parsing error.