| :py:mod:`airflow.providers.grpc.operators.grpc` |
| =============================================== |
| |
| .. py:module:: airflow.providers.grpc.operators.grpc |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.grpc.operators.grpc.GrpcOperator |
| |
| |
| |
| |
| .. py:class:: GrpcOperator(*, stub_class, call_func, grpc_conn_id = 'grpc_default', data = None, interceptors = None, custom_connection_func = None, streaming = False, response_callback = None, log_response = False, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Calls a gRPC endpoint to execute an action |
| |
| :param stub_class: The stub client to use for this gRPC call |
| :param call_func: The client function name to call the gRPC endpoint |
| :param grpc_conn_id: The connection to run the operator against |
| :param data: The data to pass to the rpc call |
| :param interceptors: A list of gRPC interceptor objects to be used on the channel |
| :param custom_connection_func: The customized connection function to return channel object. |
| A callable that accepts the connection as its only arg. |
| :param streaming: A flag to indicate if the call is a streaming call |
| :param response_callback: The callback function to process the response from gRPC call, |
| takes in response object and context object, context object can be used to perform |
| push xcom or other after task actions |
| :param log_response: A flag to indicate if we need to log the response |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['stub_class', 'call_func', 'data'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |