airflow.contrib.hooks.grpc_hook
¶
GRPC Hook
Module Contents¶
-
class
airflow.contrib.hooks.grpc_hook.
GrpcHook
(grpc_conn_id, interceptors=None, custom_connection_func=None)[source]¶ Bases:
airflow.hooks.base_hook.BaseHook
General interaction with gRPC servers.
- Parameters
grpc_conn_id (str) – The connection ID to use when fetching connection info.
interceptors (a list of gRPC interceptors based on or extends the four official gRPC interceptors, eg, UnaryUnaryClientInterceptor, UnaryStreamClientInterceptor, StreamUnaryClientInterceptor, StreamStreamClientInterceptor.) – a list of gRPC interceptor objects which would be applied to the connected gRPC channel. None by default.
custom_connection_func (python callable objects that accept the connection as its only arg. Could be partial or lambda.) – The customized connection function to return gRPC channel.