github.com/leonlxy/hyperledger@v1.0.0-alpha.0.20170427033203-34922035d248/bddtests/peer/chaincode_shim_pb2_grpc.py (about) 1 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! 2 import grpc 3 from grpc.framework.common import cardinality 4 from grpc.framework.interfaces.face import utilities as face_utilities 5 6 import peer.chaincode_shim_pb2 as peer_dot_chaincode__shim__pb2 7 8 9 class ChaincodeSupportStub(object): 10 """Interface that provides support to chaincode execution. ChaincodeContext 11 provides the context necessary for the server to respond appropriately. 12 """ 13 14 def __init__(self, channel): 15 """Constructor. 16 17 Args: 18 channel: A grpc.Channel. 19 """ 20 self.Register = channel.stream_stream( 21 '/protos.ChaincodeSupport/Register', 22 request_serializer=peer_dot_chaincode__shim__pb2.ChaincodeMessage.SerializeToString, 23 response_deserializer=peer_dot_chaincode__shim__pb2.ChaincodeMessage.FromString, 24 ) 25 26 27 class ChaincodeSupportServicer(object): 28 """Interface that provides support to chaincode execution. ChaincodeContext 29 provides the context necessary for the server to respond appropriately. 30 """ 31 32 def Register(self, request_iterator, context): 33 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 34 context.set_details('Method not implemented!') 35 raise NotImplementedError('Method not implemented!') 36 37 38 def add_ChaincodeSupportServicer_to_server(servicer, server): 39 rpc_method_handlers = { 40 'Register': grpc.stream_stream_rpc_method_handler( 41 servicer.Register, 42 request_deserializer=peer_dot_chaincode__shim__pb2.ChaincodeMessage.FromString, 43 response_serializer=peer_dot_chaincode__shim__pb2.ChaincodeMessage.SerializeToString, 44 ), 45 } 46 generic_handler = grpc.method_handlers_generic_handler( 47 'protos.ChaincodeSupport', rpc_method_handlers) 48 server.add_generic_rpc_handlers((generic_handler,))