@ -1,8 +1,6 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: route_guide.proto
# source: route_guide.proto
import sys
_b = sys . version_info [ 0 ] < 3 and ( lambda x : x ) or ( lambda x : x . encode ( ' latin1 ' ) )
from google . protobuf import descriptor as _descriptor
from google . protobuf import descriptor as _descriptor
from google . protobuf import message as _message
from google . protobuf import message as _message
from google . protobuf import reflection as _reflection
from google . protobuf import reflection as _reflection
@ -17,8 +15,9 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor . FileDescriptor (
DESCRIPTOR = _descriptor . FileDescriptor (
name = ' route_guide.proto ' ,
name = ' route_guide.proto ' ,
package = ' ' ,
package = ' routeguide ' ,
serialized_pb = _b ( ' \n \x11 route_guide.proto \" , \n \x05 Point \x12 \x10 \n \x08 latitude \x18 \x01 \x01 ( \x05 \x12 \x11 \n \t longitude \x18 \x02 \x01 ( \x05 \" 3 \n \t Rectangle \x12 \x12 \n \x02 lo \x18 \x01 \x01 ( \x0b \x32 \x06 .Point \x12 \x12 \n \x02 hi \x18 \x02 \x01 ( \x0b \x32 \x06 .Point \" 1 \n \x07 \x46 \x65 \x61 ture \x12 \x0c \n \x04 name \x18 \x01 \x01 ( \t \x12 \x18 \n \x08 location \x18 \x02 \x01 ( \x0b \x32 \x06 .Point \" 6 \n \t RouteNote \x12 \x18 \n \x08 location \x18 \x01 \x01 ( \x0b \x32 \x06 .Point \x12 \x0f \n \x07 message \x18 \x02 \x01 ( \t \" b \n \x0c RouteSummary \x12 \x13 \n \x0b point_count \x18 \x01 \x01 ( \x05 \x12 \x15 \n \r feature_count \x18 \x02 \x01 ( \x05 \x12 \x10 \n \x08 \x64 istance \x18 \x03 \x01 ( \x05 \x12 \x14 \n \x0c \x65 lapsed_time \x18 \x04 \x01 ( \x05 \x32 \xad \x01 \n \n RouteGuide \x12 \n \n GetFeature \x12 \x06 .Point \x1a \x08 .Feature \" \x00 \x12 ( \n \x0c ListFeatures \x12 \n .Rectangle \x1a \x08 .Feature \" \x00 \x30 \x01 \x12 ( \n \x0b RecordRoute \x12 \x06 .Point \x1a \r .RouteSummary \" \x00 ( \x01 \x12 ) \n \t RouteChat \x12 \n .RouteNote \x1a \n .RouteNote \" \x00 ( \x01 \x30 \x01 ' )
syntax = ' proto3 ' ,
serialized_pb = b ' \n \x11 route_guide.proto \x12 \n routeguide \" , \n \x05 Point \x12 \x10 \n \x08 latitude \x18 \x01 \x01 ( \x05 \x12 \x11 \n \t longitude \x18 \x02 \x01 ( \x05 \" I \n \t Rectangle \x12 \x1d \n \x02 lo \x18 \x01 \x01 ( \x0b \x32 \x11 .routeguide.Point \x12 \x1d \n \x02 hi \x18 \x02 \x01 ( \x0b \x32 \x11 .routeguide.Point \" < \n \x07 \x46 \x65 \x61 ture \x12 \x0c \n \x04 name \x18 \x01 \x01 ( \t \x12 # \n \x08 location \x18 \x02 \x01 ( \x0b \x32 \x11 .routeguide.Point \" A \n \t RouteNote \x12 # \n \x08 location \x18 \x01 \x01 ( \x0b \x32 \x11 .routeguide.Point \x12 \x0f \n \x07 message \x18 \x02 \x01 ( \t \" b \n \x0c RouteSummary \x12 \x13 \n \x0b point_count \x18 \x01 \x01 ( \x05 \x12 \x15 \n \r feature_count \x18 \x02 \x01 ( \x05 \x12 \x10 \n \x08 \x64 istance \x18 \x03 \x01 ( \x05 \x12 \x14 \n \x0c \x65 lapsed_time \x18 \x04 \x01 ( \x05 \x32 \x85 \x02 \n \n RouteGuide \x12 \x36 \n \n GetFeature \x12 \x11 .routeguide.Point \x1a \x13 .routeguide.Feature \" \x00 \x12 > \n \x0c ListFeatures \x12 \x15 .routeguide.Rectangle \x1a \x13 .routeguide.Feature \" \x00 \x30 \x01 \x12 > \n \x0b RecordRoute \x12 \x11 .routeguide.Point \x1a \x18 .routeguide.RouteSummary \" \x00 ( \x01 \x12 ? \n \t RouteChat \x12 \x15 .routeguide.RouteNote \x1a \x15 .routeguide.RouteNote \" \x00 ( \x01 \x30 \x01 \x42 \x0f \n \x07 \x65 x.grpc \xa2 \x02 \x03 RTGb \x06 proto3 '
)
)
_sym_db . RegisterFileDescriptor ( DESCRIPTOR )
_sym_db . RegisterFileDescriptor ( DESCRIPTOR )
@ -27,20 +26,20 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR)
_POINT = _descriptor . Descriptor (
_POINT = _descriptor . Descriptor (
name = ' Point ' ,
name = ' Point ' ,
full_name = ' Point ' ,
full_name = ' routeguide. Point' ,
filename = None ,
filename = None ,
file = DESCRIPTOR ,
file = DESCRIPTOR ,
containing_type = None ,
containing_type = None ,
fields = [
fields = [
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' latitude ' , full_name = ' Point.latitude ' , index = 0 ,
name = ' latitude ' , full_name = ' routeguide. Point.latitude' , index = 0 ,
number = 1 , type = 5 , cpp_type = 1 , label = 1 ,
number = 1 , type = 5 , cpp_type = 1 , label = 1 ,
has_default_value = False , default_value = 0 ,
has_default_value = False , default_value = 0 ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' longitude ' , full_name = ' Point.longitude ' , index = 1 ,
name = ' longitude ' , full_name = ' routeguide. Point.longitude' , index = 1 ,
number = 2 , type = 5 , cpp_type = 1 , label = 1 ,
number = 2 , type = 5 , cpp_type = 1 , label = 1 ,
has_default_value = False , default_value = 0 ,
has_default_value = False , default_value = 0 ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
@ -54,30 +53,31 @@ _POINT = _descriptor.Descriptor(
] ,
] ,
options = None ,
options = None ,
is_extendable = False ,
is_extendable = False ,
syntax = ' proto3 ' ,
extension_ranges = [ ] ,
extension_ranges = [ ] ,
oneofs = [
oneofs = [
] ,
] ,
serialized_start = 21 ,
serialized_start = 33 ,
serialized_end = 65 ,
serialized_end = 77 ,
)
)
_RECTANGLE = _descriptor . Descriptor (
_RECTANGLE = _descriptor . Descriptor (
name = ' Rectangle ' ,
name = ' Rectangle ' ,
full_name = ' Rectangle ' ,
full_name = ' routeguide. Rectangle' ,
filename = None ,
filename = None ,
file = DESCRIPTOR ,
file = DESCRIPTOR ,
containing_type = None ,
containing_type = None ,
fields = [
fields = [
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' lo ' , full_name = ' Rectangle.lo ' , index = 0 ,
name = ' lo ' , full_name = ' routeguide. Rectangle.lo' , index = 0 ,
number = 1 , type = 11 , cpp_type = 10 , label = 1 ,
number = 1 , type = 11 , cpp_type = 10 , label = 1 ,
has_default_value = False , default_value = None ,
has_default_value = False , default_value = None ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' hi ' , full_name = ' Rectangle.hi ' , index = 1 ,
name = ' hi ' , full_name = ' routeguide. Rectangle.hi' , index = 1 ,
number = 2 , type = 11 , cpp_type = 10 , label = 1 ,
number = 2 , type = 11 , cpp_type = 10 , label = 1 ,
has_default_value = False , default_value = None ,
has_default_value = False , default_value = None ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
@ -91,30 +91,31 @@ _RECTANGLE = _descriptor.Descriptor(
] ,
] ,
options = None ,
options = None ,
is_extendable = False ,
is_extendable = False ,
syntax = ' proto3 ' ,
extension_ranges = [ ] ,
extension_ranges = [ ] ,
oneofs = [
oneofs = [
] ,
] ,
serialized_start = 6 7,
serialized_start = 79 ,
serialized_end = 118 ,
serialized_end = 152 ,
)
)
_FEATURE = _descriptor . Descriptor (
_FEATURE = _descriptor . Descriptor (
name = ' Feature ' ,
name = ' Feature ' ,
full_name = ' Feature ' ,
full_name = ' routeguide. Feature' ,
filename = None ,
filename = None ,
file = DESCRIPTOR ,
file = DESCRIPTOR ,
containing_type = None ,
containing_type = None ,
fields = [
fields = [
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' name ' , full_name = ' Feature.name ' , index = 0 ,
name = ' name ' , full_name = ' routeguide. Feature.name' , index = 0 ,
number = 1 , type = 9 , cpp_type = 9 , label = 1 ,
number = 1 , type = 9 , cpp_type = 9 , label = 1 ,
has_default_value = False , default_value = _b ( " " ) . decode ( ' utf-8 ' ) ,
has_default_value = False , default_value = b " " . decode ( ' utf-8 ' ) ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' location ' , full_name = ' Feature.location ' , index = 1 ,
name = ' location ' , full_name = ' routeguide. Feature.location' , index = 1 ,
number = 2 , type = 11 , cpp_type = 10 , label = 1 ,
number = 2 , type = 11 , cpp_type = 10 , label = 1 ,
has_default_value = False , default_value = None ,
has_default_value = False , default_value = None ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
@ -128,32 +129,33 @@ _FEATURE = _descriptor.Descriptor(
] ,
] ,
options = None ,
options = None ,
is_extendable = False ,
is_extendable = False ,
syntax = ' proto3 ' ,
extension_ranges = [ ] ,
extension_ranges = [ ] ,
oneofs = [
oneofs = [
] ,
] ,
serialized_start = 120 ,
serialized_start = 154 ,
serialized_end = 169 ,
serialized_end = 214 ,
)
)
_ROUTENOTE = _descriptor . Descriptor (
_ROUTENOTE = _descriptor . Descriptor (
name = ' RouteNote ' ,
name = ' RouteNote ' ,
full_name = ' RouteNote ' ,
full_name = ' routeguide. RouteNote' ,
filename = None ,
filename = None ,
file = DESCRIPTOR ,
file = DESCRIPTOR ,
containing_type = None ,
containing_type = None ,
fields = [
fields = [
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' location ' , full_name = ' RouteNote.location ' , index = 0 ,
name = ' location ' , full_name = ' routeguide. RouteNote.location' , index = 0 ,
number = 1 , type = 11 , cpp_type = 10 , label = 1 ,
number = 1 , type = 11 , cpp_type = 10 , label = 1 ,
has_default_value = False , default_value = None ,
has_default_value = False , default_value = None ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' message ' , full_name = ' RouteNote.message ' , index = 1 ,
name = ' message ' , full_name = ' routeguide. RouteNote.message' , index = 1 ,
number = 2 , type = 9 , cpp_type = 9 , label = 1 ,
number = 2 , type = 9 , cpp_type = 9 , label = 1 ,
has_default_value = False , default_value = _b ( " " ) . decode ( ' utf-8 ' ) ,
has_default_value = False , default_value = b " " . decode ( ' utf-8 ' ) ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
@ -165,44 +167,45 @@ _ROUTENOTE = _descriptor.Descriptor(
] ,
] ,
options = None ,
options = None ,
is_extendable = False ,
is_extendable = False ,
syntax = ' proto3 ' ,
extension_ranges = [ ] ,
extension_ranges = [ ] ,
oneofs = [
oneofs = [
] ,
] ,
serialized_start = 171 ,
serialized_start = 216 ,
serialized_end = 225 ,
serialized_end = 281 ,
)
)
_ROUTESUMMARY = _descriptor . Descriptor (
_ROUTESUMMARY = _descriptor . Descriptor (
name = ' RouteSummary ' ,
name = ' RouteSummary ' ,
full_name = ' RouteSummary ' ,
full_name = ' routeguide. RouteSummary' ,
filename = None ,
filename = None ,
file = DESCRIPTOR ,
file = DESCRIPTOR ,
containing_type = None ,
containing_type = None ,
fields = [
fields = [
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' point_count ' , full_name = ' RouteSummary.point_count ' , index = 0 ,
name = ' point_count ' , full_name = ' routeguide. RouteSummary.point_count' , index = 0 ,
number = 1 , type = 5 , cpp_type = 1 , label = 1 ,
number = 1 , type = 5 , cpp_type = 1 , label = 1 ,
has_default_value = False , default_value = 0 ,
has_default_value = False , default_value = 0 ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' feature_count ' , full_name = ' RouteSummary.feature_count ' , index = 1 ,
name = ' feature_count ' , full_name = ' routeguide. RouteSummary.feature_count' , index = 1 ,
number = 2 , type = 5 , cpp_type = 1 , label = 1 ,
number = 2 , type = 5 , cpp_type = 1 , label = 1 ,
has_default_value = False , default_value = 0 ,
has_default_value = False , default_value = 0 ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' distance ' , full_name = ' RouteSummary.distance ' , index = 2 ,
name = ' distance ' , full_name = ' routeguide. RouteSummary.distance' , index = 2 ,
number = 3 , type = 5 , cpp_type = 1 , label = 1 ,
number = 3 , type = 5 , cpp_type = 1 , label = 1 ,
has_default_value = False , default_value = 0 ,
has_default_value = False , default_value = 0 ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
is_extension = False , extension_scope = None ,
is_extension = False , extension_scope = None ,
options = None ) ,
options = None ) ,
_descriptor . FieldDescriptor (
_descriptor . FieldDescriptor (
name = ' elapsed_time ' , full_name = ' RouteSummary.elapsed_time ' , index = 3 ,
name = ' elapsed_time ' , full_name = ' routeguide. RouteSummary.elapsed_time' , index = 3 ,
number = 4 , type = 5 , cpp_type = 1 , label = 1 ,
number = 4 , type = 5 , cpp_type = 1 , label = 1 ,
has_default_value = False , default_value = 0 ,
has_default_value = False , default_value = 0 ,
message_type = None , enum_type = None , containing_type = None ,
message_type = None , enum_type = None , containing_type = None ,
@ -216,11 +219,12 @@ _ROUTESUMMARY = _descriptor.Descriptor(
] ,
] ,
options = None ,
options = None ,
is_extendable = False ,
is_extendable = False ,
syntax = ' proto3 ' ,
extension_ranges = [ ] ,
extension_ranges = [ ] ,
oneofs = [
oneofs = [
] ,
] ,
serialized_start = 227 ,
serialized_start = 283 ,
serialized_end = 325 ,
serialized_end = 381 ,
)
)
_RECTANGLE . fields_by_name [ ' lo ' ] . message_type = _POINT
_RECTANGLE . fields_by_name [ ' lo ' ] . message_type = _POINT
@ -236,58 +240,61 @@ DESCRIPTOR.message_types_by_name['RouteSummary'] = _ROUTESUMMARY
Point = _reflection . GeneratedProtocolMessageType ( ' Point ' , ( _message . Message , ) , dict (
Point = _reflection . GeneratedProtocolMessageType ( ' Point ' , ( _message . Message , ) , dict (
DESCRIPTOR = _POINT ,
DESCRIPTOR = _POINT ,
__module__ = ' route_guide_pb2 '
__module__ = ' route_guide_pb2 '
# @@protoc_insertion_point(class_scope:Point)
# @@protoc_insertion_point(class_scope:routeguide. Point)
) )
) )
_sym_db . RegisterMessage ( Point )
_sym_db . RegisterMessage ( Point )
Rectangle = _reflection . GeneratedProtocolMessageType ( ' Rectangle ' , ( _message . Message , ) , dict (
Rectangle = _reflection . GeneratedProtocolMessageType ( ' Rectangle ' , ( _message . Message , ) , dict (
DESCRIPTOR = _RECTANGLE ,
DESCRIPTOR = _RECTANGLE ,
__module__ = ' route_guide_pb2 '
__module__ = ' route_guide_pb2 '
# @@protoc_insertion_point(class_scope:Rectangle)
# @@protoc_insertion_point(class_scope:routeguide. Rectangle)
) )
) )
_sym_db . RegisterMessage ( Rectangle )
_sym_db . RegisterMessage ( Rectangle )
Feature = _reflection . GeneratedProtocolMessageType ( ' Feature ' , ( _message . Message , ) , dict (
Feature = _reflection . GeneratedProtocolMessageType ( ' Feature ' , ( _message . Message , ) , dict (
DESCRIPTOR = _FEATURE ,
DESCRIPTOR = _FEATURE ,
__module__ = ' route_guide_pb2 '
__module__ = ' route_guide_pb2 '
# @@protoc_insertion_point(class_scope:Feature)
# @@protoc_insertion_point(class_scope:routeguide. Feature)
) )
) )
_sym_db . RegisterMessage ( Feature )
_sym_db . RegisterMessage ( Feature )
RouteNote = _reflection . GeneratedProtocolMessageType ( ' RouteNote ' , ( _message . Message , ) , dict (
RouteNote = _reflection . GeneratedProtocolMessageType ( ' RouteNote ' , ( _message . Message , ) , dict (
DESCRIPTOR = _ROUTENOTE ,
DESCRIPTOR = _ROUTENOTE ,
__module__ = ' route_guide_pb2 '
__module__ = ' route_guide_pb2 '
# @@protoc_insertion_point(class_scope:RouteNote)
# @@protoc_insertion_point(class_scope:routeguide. RouteNote)
) )
) )
_sym_db . RegisterMessage ( RouteNote )
_sym_db . RegisterMessage ( RouteNote )
RouteSummary = _reflection . GeneratedProtocolMessageType ( ' RouteSummary ' , ( _message . Message , ) , dict (
RouteSummary = _reflection . GeneratedProtocolMessageType ( ' RouteSummary ' , ( _message . Message , ) , dict (
DESCRIPTOR = _ROUTESUMMARY ,
DESCRIPTOR = _ROUTESUMMARY ,
__module__ = ' route_guide_pb2 '
__module__ = ' route_guide_pb2 '
# @@protoc_insertion_point(class_scope:RouteSummary)
# @@protoc_insertion_point(class_scope:routeguide. RouteSummary)
) )
) )
_sym_db . RegisterMessage ( RouteSummary )
_sym_db . RegisterMessage ( RouteSummary )
DESCRIPTOR . has_options = True
DESCRIPTOR . _options = _descriptor . _ParseOptions ( descriptor_pb2 . FileOptions ( ) , b ' \n \007 ex.grpc \242 \002 \003 RTG ' )
import abc
import abc
from grpc . _adapter import fore
from grpc . beta import implementations as beta_implementations
from grpc . _adapter import rear
from grpc . early_adopter import implementations as early_adopter_implementations
from grpc . framework . assembly import implementations
from grpc . framework . alpha import utilities as alpha_utilities
from grpc . framework . assembly import utilities
from grpc . framework . common import cardinality
from grpc . framework . interfaces . face import utilities as face_utilities
class EarlyAdopterRouteGuideServicer ( object ) :
class EarlyAdopterRouteGuideServicer ( object ) :
""" <fill me in later!> """
""" <fill me in later!> """
__metaclass__ = abc . ABCMeta
__metaclass__ = abc . ABCMeta
@abc . abstractmethod
@abc . abstractmethod
def GetFeature ( self , request ) :
def GetFeature ( self , request , context ) :
raise NotImplementedError ( )
raise NotImplementedError ( )
@abc . abstractmethod
@abc . abstractmethod
def ListFeatures ( self , request ) :
def ListFeatures ( self , request , context ) :
raise NotImplementedError ( )
raise NotImplementedError ( )
@abc . abstractmethod
@abc . abstractmethod
def RecordRoute ( self , request_iterator ) :
def RecordRoute ( self , request_iterator , context ) :
raise NotImplementedError ( )
raise NotImplementedError ( )
@abc . abstractmethod
@abc . abstractmethod
def RouteChat ( self , request_iterator ) :
def RouteChat ( self , request_iterator , context ) :
raise NotImplementedError ( )
raise NotImplementedError ( )
class EarlyAdopterRouteGuideServer ( object ) :
class EarlyAdopterRouteGuideServer ( object ) :
""" <fill me in later!> """
""" <fill me in later!> """
@ -317,54 +324,158 @@ class EarlyAdopterRouteGuideStub(object):
def RouteChat ( self , request_iterator ) :
def RouteChat ( self , request_iterator ) :
raise NotImplementedError ( )
raise NotImplementedError ( )
RouteChat . async = None
RouteChat . async = None
def early_adopter_create_RouteGuide_server ( servicer , port , root_certificates , key_chain_pairs ) :
def early_adopter_create_RouteGuide_server ( servicer , port , private_key = None , certificate_chain = None ) :
method_implementations = {
import route_guide_pb2
" GetFeature " : utilities . unary_unary_inline ( servicer . GetFeature ) ,
import route_guide_pb2
" ListFeatures " : utilities . unary_stream_inline ( servicer . ListFeatures ) ,
import route_guide_pb2
" RecordRoute " : utilities . stream_unary_inline ( servicer . RecordRoute ) ,
import route_guide_pb2
" RouteChat " : utilities . stream_stream_inline ( servicer . RouteChat ) ,
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
method_service_descriptions = {
" GetFeature " : alpha_utilities . unary_unary_service_description (
servicer . GetFeature ,
route_guide_pb2 . Point . FromString ,
route_guide_pb2 . Feature . SerializeToString ,
) ,
" ListFeatures " : alpha_utilities . unary_stream_service_description (
servicer . ListFeatures ,
route_guide_pb2 . Rectangle . FromString ,
route_guide_pb2 . Feature . SerializeToString ,
) ,
" RecordRoute " : alpha_utilities . stream_unary_service_description (
servicer . RecordRoute ,
route_guide_pb2 . Point . FromString ,
route_guide_pb2 . RouteSummary . SerializeToString ,
) ,
" RouteChat " : alpha_utilities . stream_stream_service_description (
servicer . RouteChat ,
route_guide_pb2 . RouteNote . FromString ,
route_guide_pb2 . RouteNote . SerializeToString ,
) ,
}
return early_adopter_implementations . server ( " routeguide.RouteGuide " , method_service_descriptions , port , private_key = private_key , certificate_chain = certificate_chain )
def early_adopter_create_RouteGuide_stub ( host , port , metadata_transformer = None , secure = False , root_certificates = None , private_key = None , certificate_chain = None , server_host_override = None ) :
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
method_invocation_descriptions = {
" GetFeature " : alpha_utilities . unary_unary_invocation_description (
route_guide_pb2 . Point . SerializeToString ,
route_guide_pb2 . Feature . FromString ,
) ,
" ListFeatures " : alpha_utilities . unary_stream_invocation_description (
route_guide_pb2 . Rectangle . SerializeToString ,
route_guide_pb2 . Feature . FromString ,
) ,
" RecordRoute " : alpha_utilities . stream_unary_invocation_description (
route_guide_pb2 . Point . SerializeToString ,
route_guide_pb2 . RouteSummary . FromString ,
) ,
" RouteChat " : alpha_utilities . stream_stream_invocation_description (
route_guide_pb2 . RouteNote . SerializeToString ,
route_guide_pb2 . RouteNote . FromString ,
) ,
}
}
return early_adopter_implementations . stub ( " routeguide.RouteGuide " , 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 )
class BetaRouteGuideServicer ( object ) :
""" <fill me in later!> """
__metaclass__ = abc . ABCMeta
@abc . abstractmethod
def GetFeature ( self , request , context ) :
raise NotImplementedError ( )
@abc . abstractmethod
def ListFeatures ( self , request , context ) :
raise NotImplementedError ( )
@abc . abstractmethod
def RecordRoute ( self , request_iterator , context ) :
raise NotImplementedError ( )
@abc . abstractmethod
def RouteChat ( self , request_iterator , context ) :
raise NotImplementedError ( )
class BetaRouteGuideStub ( object ) :
""" The interface to which stubs will conform. """
__metaclass__ = abc . ABCMeta
@abc . abstractmethod
def GetFeature ( self , request , timeout ) :
raise NotImplementedError ( )
GetFeature . future = None
@abc . abstractmethod
def ListFeatures ( self , request , timeout ) :
raise NotImplementedError ( )
@abc . abstractmethod
def RecordRoute ( self , request_iterator , timeout ) :
raise NotImplementedError ( )
RecordRoute . future = None
@abc . abstractmethod
def RouteChat ( self , request_iterator , timeout ) :
raise NotImplementedError ( )
def beta_create_RouteGuide_server ( servicer , pool = None , pool_size = None , default_timeout = None , maximum_timeout = None ) :
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
request_deserializers = {
request_deserializers = {
" GetFeature " : route_guide_pb2 . Point . FromString ,
( ' routeguide.RouteGuide ' , ' GetFeature ' ) : route_guide_pb2 . Point . FromString ,
" ListFeatures " : route_guide_pb2 . Rectangle . FromString ,
( ' routeguide.RouteGuide ' , ' ListFeatures ' ) : route_guide_pb2 . Rectangle . FromString ,
" RecordRoute " : route_guide_pb2 . Point . FromString ,
( ' routeguide.RouteGuide ' , ' RecordRoute ' ) : route_guide_pb2 . Point . FromString ,
" RouteChat " : route_guide_pb2 . RouteNote . FromString ,
( ' routeguide.RouteGuide ' , ' RouteChat ' ) : route_guide_pb2 . RouteNote . FromString ,
}
}
response_serializers = {
response_serializers = {
" GetFeature " : lambda x : x . SerializeToString ( ) ,
( ' routeguide.RouteGuide ' , ' GetFeature ' ) : route_guide_pb2 . Feature . SerializeToString ,
" ListFeatures " : lambda x : x . SerializeToString ( ) ,
( ' routeguide.RouteGuide ' , ' ListFeatures ' ) : route_guide_pb2 . Feature . SerializeToString ,
" RecordRoute " : lambda x : x . SerializeToString ( ) ,
( ' routeguide.RouteGuide ' , ' RecordRoute ' ) : route_guide_pb2 . RouteSummary . SerializeToString ,
" RouteChat " : lambda x : x . SerializeToString ( ) ,
( ' routeguide.RouteGuide ' , ' RouteChat ' ) : route_guide_pb2 . RouteNote . SerializeToString ,
}
}
link = fore . activated_fore_link ( port , request_deserializers , response_serializers , root_certificates , key_chain_pairs )
return implementations . assemble_service ( method_implementations , link )
def early_adopter_create_RouteGuide_stub ( host , port ) :
method_implementations = {
method_implementations = {
" GetFeature " : utilities . unary_unary_inline ( None ) ,
( ' routeguide.RouteGuide ' , ' GetFeature ' ) : face_utilities . unary_unary_inline ( servicer . GetFeature ) ,
" ListFeatures " : utilities . unary_stream_inline ( None ) ,
( ' routeguide.RouteGuide ' , ' ListFeatures ' ) : face_utilities . unary_stream_inline ( servicer . ListFeatures ) ,
" RecordRoute " : utilities . stream_unary_inline ( None ) ,
( ' routeguide.RouteGuide ' , ' RecordRoute ' ) : face_ utilities. stream_unary_inline ( servicer . RecordRout e) ,
" RouteChat " : utilities . stream_stream_inline ( None ) ,
( ' routeguide.RouteGuide ' , ' RouteChat ' ) : face_ utilities. stream_stream_inline ( servicer . RouteChat ) ,
}
}
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 )
return beta_implementations . server ( method_implementations , options = server_options )
def beta_create_RouteGuide_stub ( channel , host = None , metadata_transformer = None , pool = None , pool_size = None ) :
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
import route_guide_pb2
request_serializers = {
( ' routeguide.RouteGuide ' , ' GetFeature ' ) : route_guide_pb2 . Point . SerializeToString ,
( ' routeguide.RouteGuide ' , ' ListFeatures ' ) : route_guide_pb2 . Rectangle . SerializeToString ,
( ' routeguide.RouteGuide ' , ' RecordRoute ' ) : route_guide_pb2 . Point . SerializeToString ,
( ' routeguide.RouteGuide ' , ' RouteChat ' ) : route_guide_pb2 . RouteNote . SerializeToString ,
}
response_deserializers = {
response_deserializers = {
" GetFeature " : route_guide_pb2 . Feature . FromString ,
( ' routeguide.RouteGuide ' , ' GetFeature ' ) : route_guide_pb2 . Feature . FromString ,
" ListFeatures " : route_guide_pb2 . Feature . FromString ,
( ' routeguide.RouteGuide ' , ' ListFeatures ' ) : route_guide_pb2 . Feature . FromString ,
" RecordRoute " : route_guide_pb2 . RouteSummary . FromString ,
( ' routeguide.RouteGuide ' , ' RecordRoute ' ) : route_guide_pb2 . RouteSummary . FromString ,
" RouteChat " : route_guide_pb2 . RouteNote . FromString ,
( ' routeguide.RouteGuide ' , ' RouteChat ' ) : route_guide_pb2 . RouteNote . FromString ,
}
}
request_serializers = {
cardinalitie s = {
" GetFeature " : lambda x : x . SerializeToString ( ) ,
' GetFeature ' : cardinality . Cardinality . UNARY_UNARY ,
" ListFeatures " : lambda x : x . SerializeToString ( ) ,
' ListFeatures ' : cardinality . Cardinality . UNARY_STREAM ,
" RecordRoute " : lambda x : x . SerializeToString ( ) ,
' RecordRoute ' : cardinality . Cardinality . STREAM_UNARY ,
" RouteChat " : lambda x : x . SerializeToString ( ) ,
' RouteChat ' : cardinality . Cardinality . STREAM_STREAM ,
}
}
link = rear . activated_rear_link ( host , port , request_serializers , response_deserializers )
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 )
return implementations . assemble_dynamic_inline_stub ( method_implementations , link )
return beta_ implementations. dynamic_stub ( channel , ' routeguide.RouteGuide ' , cardinalities , options = stub_options )
# @@protoc_insertion_point(module_scope)
# @@protoc_insertion_point(module_scope)