本文整理汇总了Python中grpc.beta.implementations.server_options方法的典型用法代码示例。如果您正苦于以下问题:Python implementations.server_options方法的具体用法?Python implementations.server_options怎么用?Python implementations.server_options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类grpc.beta.implementations
的用法示例。
在下文中一共展示了implementations.server_options方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: beta_create_PredictionService_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_PredictionService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('tensorflow.serving.PredictionService', 'Predict'): PredictRequest.FromString,
}
response_serializers = {
('tensorflow.serving.PredictionService', 'Predict'): PredictResponse.SerializeToString,
}
method_implementations = {
('tensorflow.serving.PredictionService', 'Predict'): face_utilities.unary_unary_inline(servicer.Predict),
}
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)
示例2: beta_create_Greeter_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_Greeter_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('worldhello.Greeter', 'SayHello'): HelloRequest.FromString,
('worldhello.Greeter', 'SayHelloAgain'): HelloRequest.FromString,
}
response_serializers = {
('worldhello.Greeter', 'SayHello'): HelloReply.SerializeToString,
('worldhello.Greeter', 'SayHelloAgain'): HelloReply.SerializeToString,
}
method_implementations = {
('worldhello.Greeter', 'SayHello'): face_utilities.unary_unary_inline(servicer.SayHello),
('worldhello.Greeter', 'SayHelloAgain'): face_utilities.unary_unary_inline(servicer.SayHelloAgain),
}
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)
示例3: beta_create_Greeter_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_Greeter_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('helloworld.Greeter', 'SayHello'): HelloRequest.FromString,
}
response_serializers = {
('helloworld.Greeter', 'SayHello'): HelloReply.SerializeToString,
}
method_implementations = {
('helloworld.Greeter', 'SayHello'): face_utilities.unary_unary_inline(servicer.SayHello),
}
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)
示例4: beta_create_PredictionService_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_PredictionService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictRequest.FromString,
}
response_serializers = {
('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictResponse.SerializeToString,
}
method_implementations = {
('tensorflow.serving.PredictionService', 'Predict'): face_utilities.unary_unary_inline(servicer.Predict),
}
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)
示例5: beta_create_OnlineActionHandler_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_OnlineActionHandler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('OnlineActionHandler', '_health_check'): HealthCheckRequest.FromString,
('OnlineActionHandler', '_remote_execute'): OnlineActionRequest.FromString,
('OnlineActionHandler', '_remote_reload'): ReloadRequest.FromString,
}
response_serializers = {
('OnlineActionHandler', '_health_check'): HealthCheckResponse.SerializeToString,
('OnlineActionHandler', '_remote_execute'): OnlineActionResponse.SerializeToString,
('OnlineActionHandler', '_remote_reload'): ReloadResponse.SerializeToString,
}
method_implementations = {
('OnlineActionHandler', '_health_check'): face_utilities.unary_unary_inline(servicer._health_check),
('OnlineActionHandler', '_remote_execute'): face_utilities.unary_unary_inline(servicer._remote_execute),
('OnlineActionHandler', '_remote_reload'): face_utilities.unary_unary_inline(servicer._remote_reload),
}
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)
示例6: beta_create_BatchActionHandler_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_BatchActionHandler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('BatchActionHandler', '_health_check'): HealthCheckRequest.FromString,
('BatchActionHandler', '_remote_execute'): BatchActionRequest.FromString,
('BatchActionHandler', '_remote_reload'): ReloadRequest.FromString,
}
response_serializers = {
('BatchActionHandler', '_health_check'): HealthCheckResponse.SerializeToString,
('BatchActionHandler', '_remote_execute'): BatchActionResponse.SerializeToString,
('BatchActionHandler', '_remote_reload'): ReloadResponse.SerializeToString,
}
method_implementations = {
('BatchActionHandler', '_health_check'): face_utilities.unary_unary_inline(servicer._health_check),
('BatchActionHandler', '_remote_execute'): face_utilities.unary_unary_inline(servicer._remote_execute),
('BatchActionHandler', '_remote_reload'): face_utilities.unary_unary_inline(servicer._remote_reload),
}
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)
示例7: beta_create_ModelService_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_ModelService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.FromString,
}
response_serializers = {
('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.SerializeToString,
}
method_implementations = {
('tensorflow.serving.ModelService', 'GetModelStatus'): face_utilities.unary_unary_inline(servicer.GetModelStatus),
}
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)
示例8: beta_create_ClusterSpecGenerator_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_ClusterSpecGenerator_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecRequest.FromString,
('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerRequest.FromString,
}
response_serializers = {
('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecReply.SerializeToString,
('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerReply.SerializeToString,
}
method_implementations = {
('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): face_utilities.unary_unary_inline(servicer.GetClusterSpec),
('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): face_utilities.unary_unary_inline(servicer.RegisterContainer),
}
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)
示例9: beta_create_CommandLine_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_CommandLine_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('command_line.CommandLine', 'Echo'): CommandRequest.FromString,
}
response_serializers = {
('command_line.CommandLine', 'Echo'): CommandResponse.SerializeToString,
}
method_implementations = {
('command_line.CommandLine', 'Echo'): face_utilities.unary_unary_inline(servicer.Echo),
}
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)
示例10: beta_create_Health_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_Health_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('grpc.health.v1.Health', 'Check'): HealthCheckRequest.FromString,
}
response_serializers = {
('grpc.health.v1.Health', 'Check'): HealthCheckResponse.SerializeToString,
}
method_implementations = {
('grpc.health.v1.Health', 'Check'): face_utilities.unary_unary_inline(servicer.Check),
}
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)
示例11: beta_create_Publisher_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_Publisher_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('predix.eventhub.Publisher', 'send'): PublishRequest.FromString,
}
response_serializers = {
('predix.eventhub.Publisher', 'send'): PublishResponse.SerializeToString,
}
method_implementations = {
('predix.eventhub.Publisher', 'send'): face_utilities.stream_stream_inline(servicer.send),
}
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)
示例12: beta_create_Subscriber_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_Subscriber_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('predix.eventhub.Subscriber', 'receive'): SubscriptionRequest.FromString,
('predix.eventhub.Subscriber', 'receiveWithAcks'): SubscriptionResponse.FromString,
('predix.eventhub.Subscriber', 'subscribe'): SubscriptionAcks.FromString,
}
response_serializers = {
('predix.eventhub.Subscriber', 'receive'): Message.SerializeToString,
('predix.eventhub.Subscriber', 'receiveWithAcks'): Message.SerializeToString,
('predix.eventhub.Subscriber', 'subscribe'): SubscriptionMessage.SerializeToString,
}
method_implementations = {
('predix.eventhub.Subscriber', 'receive'): face_utilities.unary_stream_inline(servicer.receive),
('predix.eventhub.Subscriber', 'receiveWithAcks'): face_utilities.stream_stream_inline(servicer.receiveWithAcks),
('predix.eventhub.Subscriber', 'subscribe'): face_utilities.stream_stream_inline(servicer.subscribe),
}
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)
示例13: beta_create_Calculator_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_Calculator_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('Calculator', 'SquareRoot'): Number.FromString,
}
response_serializers = {
('Calculator', 'SquareRoot'): Number.SerializeToString,
}
method_implementations = {
('Calculator', 'SquareRoot'): face_utilities.unary_unary_inline(servicer.SquareRoot),
}
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)
示例14: beta_create_Connector_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_Connector_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('qlik.sse.Connector', 'EvaluateScript'): BundledRows.FromString,
('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.FromString,
('qlik.sse.Connector', 'GetCapabilities'): Empty.FromString,
}
response_serializers = {
('qlik.sse.Connector', 'EvaluateScript'): BundledRows.SerializeToString,
('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.SerializeToString,
('qlik.sse.Connector', 'GetCapabilities'): Capabilities.SerializeToString,
}
method_implementations = {
('qlik.sse.Connector', 'EvaluateScript'): face_utilities.stream_stream_inline(servicer.EvaluateScript),
('qlik.sse.Connector', 'ExecuteFunction'): face_utilities.stream_stream_inline(servicer.ExecuteFunction),
('qlik.sse.Connector', 'GetCapabilities'): face_utilities.unary_unary_inline(servicer.GetCapabilities),
}
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)
示例15: beta_create_NetworkServerManager_server
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import server_options [as 别名]
def beta_create_NetworkServerManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('networkserver.NetworkServerManager', 'GetStatus'): StatusRequest.FromString,
}
response_serializers = {
('networkserver.NetworkServerManager', 'GetStatus'): Status.SerializeToString,
}
method_implementations = {
('networkserver.NetworkServerManager', 'GetStatus'): face_utilities.unary_unary_inline(servicer.GetStatus),
}
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)