| :py:mod:`airflow.providers.grpc.hooks.grpc` |
| =========================================== |
| |
| .. py:module:: airflow.providers.grpc.hooks.grpc |
| |
| .. autoapi-nested-parse:: |
| |
| GRPC Hook |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.grpc.hooks.grpc.GrpcHook |
| |
| |
| |
| |
| .. py:class:: GrpcHook(grpc_conn_id = default_conn_name, interceptors = None, custom_connection_func = None) |
| |
| Bases: :py:obj:`airflow.hooks.base.BaseHook` |
| |
| General interaction with gRPC servers. |
| |
| :param grpc_conn_id: The connection ID to use when fetching connection info. |
| :param interceptors: 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. |
| :param custom_connection_func: The customized connection function to return gRPC channel. |
| A callable that accepts the connection as its only arg. |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = grpc_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = grpc_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = grpc |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = GRPC Connection |
| |
| |
| |
| .. py:method:: get_connection_form_widgets() |
| :staticmethod: |
| |
| Returns connection widgets to add to connection form |
| |
| |
| .. py:method:: get_conn(self) |
| |
| Returns connection for the hook. |
| |
| |
| .. py:method:: run(self, stub_class, call_func, streaming = False, data = None) |
| |
| Call gRPC function and yield response to caller |
| |
| |
| |