Nathaniel Manista | 4e7ea93 | 2015-10-07 14:34:08 +0000 | [diff] [blame] | 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | # source: helloworld.proto |
| 3 | |
| 4 | from google.protobuf import descriptor as _descriptor |
| 5 | from google.protobuf import message as _message |
| 6 | from google.protobuf import reflection as _reflection |
| 7 | from google.protobuf import symbol_database as _symbol_database |
| 8 | from google.protobuf import descriptor_pb2 |
| 9 | # @@protoc_insertion_point(imports) |
| 10 | |
| 11 | _sym_db = _symbol_database.Default() |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | DESCRIPTOR = _descriptor.FileDescriptor( |
| 17 | name='helloworld.proto', |
| 18 | package='helloworld', |
| 19 | syntax='proto3', |
| 20 | serialized_pb=b'\n\x10helloworld.proto\x12\nhelloworld\"\x1c\n\x0cHelloRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1d\n\nHelloReply\x12\x0f\n\x07message\x18\x01 \x01(\t2I\n\x07Greeter\x12>\n\x08SayHello\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00\x42\x18\n\x10io.grpc.examples\xa2\x02\x03HLWb\x06proto3' |
| 21 | ) |
| 22 | _sym_db.RegisterFileDescriptor(DESCRIPTOR) |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | _HELLOREQUEST = _descriptor.Descriptor( |
| 28 | name='HelloRequest', |
| 29 | full_name='helloworld.HelloRequest', |
| 30 | filename=None, |
| 31 | file=DESCRIPTOR, |
| 32 | containing_type=None, |
| 33 | fields=[ |
| 34 | _descriptor.FieldDescriptor( |
| 35 | name='name', full_name='helloworld.HelloRequest.name', index=0, |
| 36 | number=1, type=9, cpp_type=9, label=1, |
| 37 | has_default_value=False, default_value=b"".decode('utf-8'), |
| 38 | message_type=None, enum_type=None, containing_type=None, |
| 39 | is_extension=False, extension_scope=None, |
| 40 | options=None), |
| 41 | ], |
| 42 | extensions=[ |
| 43 | ], |
| 44 | nested_types=[], |
| 45 | enum_types=[ |
| 46 | ], |
| 47 | options=None, |
| 48 | is_extendable=False, |
| 49 | syntax='proto3', |
| 50 | extension_ranges=[], |
| 51 | oneofs=[ |
| 52 | ], |
| 53 | serialized_start=32, |
| 54 | serialized_end=60, |
| 55 | ) |
| 56 | |
| 57 | |
| 58 | _HELLOREPLY = _descriptor.Descriptor( |
| 59 | name='HelloReply', |
| 60 | full_name='helloworld.HelloReply', |
| 61 | filename=None, |
| 62 | file=DESCRIPTOR, |
| 63 | containing_type=None, |
| 64 | fields=[ |
| 65 | _descriptor.FieldDescriptor( |
| 66 | name='message', full_name='helloworld.HelloReply.message', index=0, |
| 67 | number=1, type=9, cpp_type=9, label=1, |
| 68 | has_default_value=False, default_value=b"".decode('utf-8'), |
| 69 | message_type=None, enum_type=None, containing_type=None, |
| 70 | is_extension=False, extension_scope=None, |
| 71 | options=None), |
| 72 | ], |
| 73 | extensions=[ |
| 74 | ], |
| 75 | nested_types=[], |
| 76 | enum_types=[ |
| 77 | ], |
| 78 | options=None, |
| 79 | is_extendable=False, |
| 80 | syntax='proto3', |
| 81 | extension_ranges=[], |
| 82 | oneofs=[ |
| 83 | ], |
| 84 | serialized_start=62, |
| 85 | serialized_end=91, |
| 86 | ) |
| 87 | |
| 88 | DESCRIPTOR.message_types_by_name['HelloRequest'] = _HELLOREQUEST |
| 89 | DESCRIPTOR.message_types_by_name['HelloReply'] = _HELLOREPLY |
| 90 | |
| 91 | HelloRequest = _reflection.GeneratedProtocolMessageType('HelloRequest', (_message.Message,), dict( |
| 92 | DESCRIPTOR = _HELLOREQUEST, |
| 93 | __module__ = 'helloworld_pb2' |
| 94 | # @@protoc_insertion_point(class_scope:helloworld.HelloRequest) |
| 95 | )) |
| 96 | _sym_db.RegisterMessage(HelloRequest) |
| 97 | |
| 98 | HelloReply = _reflection.GeneratedProtocolMessageType('HelloReply', (_message.Message,), dict( |
| 99 | DESCRIPTOR = _HELLOREPLY, |
| 100 | __module__ = 'helloworld_pb2' |
| 101 | # @@protoc_insertion_point(class_scope:helloworld.HelloReply) |
| 102 | )) |
| 103 | _sym_db.RegisterMessage(HelloReply) |
| 104 | |
| 105 | |
| 106 | DESCRIPTOR.has_options = True |
| 107 | DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\020io.grpc.examples\242\002\003HLW') |
| 108 | import abc |
| 109 | from grpc.beta import implementations as beta_implementations |
| 110 | from grpc.early_adopter import implementations as early_adopter_implementations |
| 111 | from grpc.framework.alpha import utilities as alpha_utilities |
| 112 | from grpc.framework.common import cardinality |
| 113 | from grpc.framework.interfaces.face import utilities as face_utilities |
| 114 | class EarlyAdopterGreeterServicer(object): |
| 115 | """<fill me in later!>""" |
| 116 | __metaclass__ = abc.ABCMeta |
| 117 | @abc.abstractmethod |
| 118 | def SayHello(self, request, context): |
| 119 | raise NotImplementedError() |
| 120 | class EarlyAdopterGreeterServer(object): |
| 121 | """<fill me in later!>""" |
| 122 | __metaclass__ = abc.ABCMeta |
| 123 | @abc.abstractmethod |
| 124 | def start(self): |
| 125 | raise NotImplementedError() |
| 126 | @abc.abstractmethod |
| 127 | def stop(self): |
| 128 | raise NotImplementedError() |
| 129 | class EarlyAdopterGreeterStub(object): |
| 130 | """<fill me in later!>""" |
| 131 | __metaclass__ = abc.ABCMeta |
| 132 | @abc.abstractmethod |
| 133 | def SayHello(self, request): |
| 134 | raise NotImplementedError() |
| 135 | SayHello.async = None |
| 136 | def early_adopter_create_Greeter_server(servicer, port, private_key=None, certificate_chain=None): |
| 137 | import helloworld_pb2 |
| 138 | import helloworld_pb2 |
| 139 | method_service_descriptions = { |
| 140 | "SayHello": alpha_utilities.unary_unary_service_description( |
| 141 | servicer.SayHello, |
| 142 | helloworld_pb2.HelloRequest.FromString, |
| 143 | helloworld_pb2.HelloReply.SerializeToString, |
| 144 | ), |
| 145 | } |
| 146 | return early_adopter_implementations.server("helloworld.Greeter", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain) |
| 147 | def early_adopter_create_Greeter_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None): |
| 148 | import helloworld_pb2 |
| 149 | import helloworld_pb2 |
| 150 | method_invocation_descriptions = { |
| 151 | "SayHello": alpha_utilities.unary_unary_invocation_description( |
| 152 | helloworld_pb2.HelloRequest.SerializeToString, |
| 153 | helloworld_pb2.HelloReply.FromString, |
| 154 | ), |
| 155 | } |
| 156 | return early_adopter_implementations.stub("helloworld.Greeter", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override) |
| 157 | |
| 158 | class BetaGreeterServicer(object): |
| 159 | """<fill me in later!>""" |
| 160 | __metaclass__ = abc.ABCMeta |
| 161 | @abc.abstractmethod |
| 162 | def SayHello(self, request, context): |
| 163 | raise NotImplementedError() |
| 164 | |
| 165 | class BetaGreeterStub(object): |
| 166 | """The interface to which stubs will conform.""" |
| 167 | __metaclass__ = abc.ABCMeta |
| 168 | @abc.abstractmethod |
| 169 | def SayHello(self, request, timeout): |
| 170 | raise NotImplementedError() |
| 171 | SayHello.future = None |
| 172 | |
| 173 | def beta_create_Greeter_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): |
| 174 | import helloworld_pb2 |
| 175 | import helloworld_pb2 |
| 176 | request_deserializers = { |
| 177 | ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloRequest.FromString, |
| 178 | } |
| 179 | response_serializers = { |
| 180 | ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloReply.SerializeToString, |
| 181 | } |
| 182 | method_implementations = { |
| 183 | ('helloworld.Greeter', 'SayHello'): face_utilities.unary_unary_inline(servicer.SayHello), |
| 184 | } |
| 185 | server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) |
| 186 | return beta_implementations.server(method_implementations, options=server_options) |
| 187 | |
| 188 | def beta_create_Greeter_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): |
| 189 | import helloworld_pb2 |
| 190 | import helloworld_pb2 |
| 191 | request_serializers = { |
| 192 | ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloRequest.SerializeToString, |
| 193 | } |
| 194 | response_deserializers = { |
| 195 | ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloReply.FromString, |
| 196 | } |
| 197 | cardinalities = { |
| 198 | 'SayHello': cardinality.Cardinality.UNARY_UNARY, |
| 199 | } |
| 200 | stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) |
| 201 | return beta_implementations.dynamic_stub(channel, 'helloworld.Greeter', cardinalities, options=stub_options) |
| 202 | # @@protoc_insertion_point(module_scope) |