from __future__ import absolute_import
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
from builtins import object
import grpc
from . import beam_runner_api_pb2 as beam__runner__api__pb2
[docs]class TestStreamServiceStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Events = channel.unary_stream(
'/org.apache.beam.model.pipeline.v1.TestStreamService/Events',
request_serializer=beam__runner__api__pb2.EventsRequest.SerializeToString,
response_deserializer=beam__runner__api__pb2.TestStreamPayload.Event.FromString,
)
[docs]class TestStreamServiceServicer(object):
# missing associated documentation comment in .proto file
pass
[docs] def Events(self, request, context):
"""A TestStream will request for events using this RPC.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
[docs]def add_TestStreamServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Events': grpc.unary_stream_rpc_method_handler(
servicer.Events,
request_deserializer=beam__runner__api__pb2.EventsRequest.FromString,
response_serializer=beam__runner__api__pb2.TestStreamPayload.Event.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'org.apache.beam.model.pipeline.v1.TestStreamService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))