airflow.providers.grpc.hooks.grpc¶
GRPC Hook.
Classes¶
General interaction with gRPC servers. |
Module Contents¶
- class airflow.providers.grpc.hooks.grpc.GrpcHook(grpc_conn_id=default_conn_name, interceptors=None, custom_connection_func=None)[source]¶
Bases:
airflow.hooks.base.BaseHook
General interaction with gRPC servers.
- Parameters:
grpc_conn_id (str) – The connection ID to use when fetching connection info.
interceptors (list[Callable] | None) – a list of gRPC interceptor objects which would be applied to the connected gRPC channel. None by default. Each interceptor should based on or extends the four official gRPC interceptors, eg, UnaryUnaryClientInterceptor, UnaryStreamClientInterceptor, StreamUnaryClientInterceptor, StreamStreamClientInterceptor.
custom_connection_func (Callable | None) – The customized connection function to return gRPC channel. A callable that accepts the connection as its only arg.