Appearance
module hub.client
class HubClient
A convenience utility class for making GRPC unary, client and server streaming requests to Cegal Hub Connectors via a running Cegal Hub Server.
Args:
HubChannel(HubChannel): Extends HubChannel which provides logic for setting up a GRPC channel
method __init__
python
__init__(
connection_parameters: ConnectionParameters = None,
token_provider=None
)Create a HubClient utility object for making Cegal Hub Connector requests via a Cegal Hub Server.
Args:
connection_parameters(ConnectionParameters, optional): The configuration details to communicate with a running Cegal Hub Server. Defaults to None.token_provider(token_provider, optional): Most often an OidcClient object. Defaults to None.
property channel
The GRPC channel associated with a running Cegal Hub Server.
Returns:
Channel: The GRPC channel associated with a running Cegal Hub Server.
property connection_parameters
The ConnectionParameters object associated with the running Cegal Hub Server.
Returns:
ConnectionParameters: The ConnectionParameters object associated with the running Cegal Hub Server.
property connector_request_stub
The service stub for clients to communicate with Cegal Hub Connectors
Returns:
ConnectorRequestServiceStub: The service stub for clients to communicate with Cegal Hub Connectors
property server_request_stub
The service stub for clients to communicate with a Cegal Hub Server
Returns:
ServerServiceStub: The service stub for clients to communicate with a Cegal Hub Server
property token_provider
The token provider associated with authenticating against a Cegal Hub Server.
Returns:
token_provider: Usually an OidcClient.
method close
python
close()Close the underlying GRPC channel.
method do_client_streaming
python
do_client_streaming(
wellknown_connector_identifier: str,
wellknown_payload_identifier: str,
iterable_payloads: Iterable,
connector_filter: ConnectorFilter = None,
major_version: int = 0,
minor_version: int = 0
)Make a client streaming GRPC client request against a wellknown Cegal Hub Connector type and wellknown payload identifier via a running Cegal Hub Server.
Args:
wellknown_connector_identifier(str): The wellknown identifier of a Cegal Hub Connector type such as cegal.hub.agent or cegal.hub.petrelwellknown_payload_identifier(str): The wellknown payload identifier (functionality supported by the Cegal Hub Connector) such as cegal.hub.agent.list_filesiterable_payloads(Iterable): The client payloads to stream to the Cegal Hub Connectormajor_version(int): The major version number for the payloadminor_version(int): The minor version number for the payloadconnector_filter(ConnectorFilter, optional): A ConnectorFilter to help target a specific Connector instance(s). Defaults to None.
Returns:
tuple: A tuple containing a success / failure bool, the result Any payload and the connector instance identifier str that handled the request
Yields:
[type]: [description]
method do_server_streaming
python
do_server_streaming(
wellknown_connector_identifier: str,
wellknown_payload_identifier: str,
payload,
connector_filter: ConnectorFilter = None,
major_version: int = 0,
minor_version: int = 0
)Make a server streaming GRPC client request against a wellknown Cegal Hub Connector type and wellknown payload identifier via a running Cegal Hub Server.
Args:
wellknown_connector_identifier(str): The wellknown identifier of a Cegal Hub Connector type such as cegal.hub.agent or cegal.hub.petrelwellknown_payload_identifier(str): The wellknown payload identifier (functionality supported by the Cegal Hub Connector) such as cegal.hub.agent.list_filespayload(Any): A protobuf Any objectconnector_filter(ConnectorFilter, optional): A ConnectorFilter to help target a specific Connector instance(s). Defaults to None.major_version(int): The major version number for the payloadminor_version(int): The minor version number for the payload
Yields:
tuple: A tuple containing a success / failure bool, the result Any payload and the connector instance identifier str that handled the request
method do_unary_request
python
do_unary_request(
wellknown_connector_identifier,
wellknown_payload_identifier,
payload,
connector_filter: ConnectorFilter = None,
major_version: int = 0,
minor_version: int = 0
)Make a unary GRPC client request against a wellknown Cegal Hub Connector type and wellknown payload identifier via a running Cegal Hub Server.
Args:
wellknown_connector_identifier(str): The wellknown identifier of a Cegal Hub Connector type such as cegal.hub.agent or cegal.hub.petrelwellknown_payload_identifier(str): The wellknown payload identifier (functionality supported by the Cegal Hub Connector) such as cegal.hub.agent.list_filespayload(Any): A protobuf Any objectmajor_version(int): The major version number for the payloadminor_version(int): The minor version number for the payloadconnector_filter(ConnectorFilter, optional): A ConnectorFilter to help target a specific Connector instance(s). Defaults to None.
Returns:
tuple: A tuple containing a success / failure bool, the result Any payload and the connector instance identifier str that handled the request
This file was automatically generated via lazydocs.