當前位置: 首頁>>代碼示例>>Python>>正文


Python implementations.server_options方法代碼示例

本文整理匯總了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) 
開發者ID:llSourcell,項目名稱:Make_Money_with_Tensorflow,代碼行數:19,代碼來源:prediction_service_pb2.py

示例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) 
開發者ID:shanbay,項目名稱:sea,代碼行數:22,代碼來源:worldhello_pb2.py

示例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) 
開發者ID:shanbay,項目名稱:sea,代碼行數:19,代碼來源:helloworld_pb2.py

示例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) 
開發者ID:tensorlayer,項目名稱:text-antispam,代碼行數:19,代碼來源:prediction_service_pb2.py

示例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) 
開發者ID:marvin-ai,項目名稱:marvin-python-toolbox,代碼行數:25,代碼來源:actions_pb2.py

示例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) 
開發者ID:marvin-ai,項目名稱:marvin-python-toolbox,代碼行數:25,代碼來源:actions_pb2.py

示例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) 
開發者ID:huseinzol05,項目名稱:Gather-Deployment,代碼行數:19,代碼來源:model_service_pb2.py

示例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) 
開發者ID:logicalclocks,項目名稱:hops-tensorflow,代碼行數:22,代碼來源:clusterspecgenerator_pb2.py

示例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) 
開發者ID:opentracing-contrib,項目名稱:python-grpc,代碼行數:19,代碼來源:command_line_pb2.py

示例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) 
開發者ID:PredixDev,項目名稱:predixpy,代碼行數:19,代碼來源:Health_pb2.py

示例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) 
開發者ID:PredixDev,項目名稱:predixpy,代碼行數:19,代碼來源:EventHub_pb2.py

示例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) 
開發者ID:PredixDev,項目名稱:predixpy,代碼行數:25,代碼來源:EventHub_pb2.py

示例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) 
開發者ID:ramananbalakrishnan,項目名稱:basic-grpc-python,代碼行數:19,代碼來源:calculator_pb2.py

示例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) 
開發者ID:nabeel-oz,項目名稱:qlik-py-tools,代碼行數:25,代碼來源:ServerSideExtension_pb2.py

示例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) 
開發者ID:TheThingsNetwork,項目名稱:python-app-sdk,代碼行數:19,代碼來源:networkserver_pb2.py


注:本文中的grpc.beta.implementations.server_options方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。