本文整理汇总了Python中grpc.beta.implementations.dynamic_stub方法的典型用法代码示例。如果您正苦于以下问题:Python implementations.dynamic_stub方法的具体用法?Python implementations.dynamic_stub怎么用?Python implementations.dynamic_stub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类grpc.beta.implementations
的用法示例。
在下文中一共展示了implementations.dynamic_stub方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: beta_create_PredictionService_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_PredictionService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('tensorflow.serving.PredictionService', 'Predict'): PredictRequest.SerializeToString,
}
response_deserializers = {
('tensorflow.serving.PredictionService', 'Predict'): PredictResponse.FromString,
}
cardinalities = {
'Predict': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options)
示例2: beta_create_Greeter_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_Greeter_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('worldhello.Greeter', 'SayHello'): HelloRequest.SerializeToString,
('worldhello.Greeter', 'SayHelloAgain'): HelloRequest.SerializeToString,
}
response_deserializers = {
('worldhello.Greeter', 'SayHello'): HelloReply.FromString,
('worldhello.Greeter', 'SayHelloAgain'): HelloReply.FromString,
}
cardinalities = {
'SayHello': cardinality.Cardinality.UNARY_UNARY,
'SayHelloAgain': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'worldhello.Greeter', cardinalities, options=stub_options)
示例3: beta_create_Greeter_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_Greeter_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('helloworld.Greeter', 'SayHello'): HelloRequest.SerializeToString,
}
response_deserializers = {
('helloworld.Greeter', 'SayHello'): HelloReply.FromString,
}
cardinalities = {
'SayHello': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'helloworld.Greeter', cardinalities, options=stub_options)
示例4: beta_create_PredictionService_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_PredictionService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictRequest.SerializeToString,
}
response_deserializers = {
('tensorflow.serving.PredictionService', 'Predict'): predict__pb2.PredictResponse.FromString,
}
cardinalities = {
'Predict': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options)
示例5: beta_create_OnlineActionHandler_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_OnlineActionHandler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('OnlineActionHandler', '_health_check'): HealthCheckRequest.SerializeToString,
('OnlineActionHandler', '_remote_execute'): OnlineActionRequest.SerializeToString,
('OnlineActionHandler', '_remote_reload'): ReloadRequest.SerializeToString,
}
response_deserializers = {
('OnlineActionHandler', '_health_check'): HealthCheckResponse.FromString,
('OnlineActionHandler', '_remote_execute'): OnlineActionResponse.FromString,
('OnlineActionHandler', '_remote_reload'): ReloadResponse.FromString,
}
cardinalities = {
'_health_check': cardinality.Cardinality.UNARY_UNARY,
'_remote_execute': cardinality.Cardinality.UNARY_UNARY,
'_remote_reload': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'OnlineActionHandler', cardinalities, options=stub_options)
示例6: beta_create_BatchActionHandler_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_BatchActionHandler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('BatchActionHandler', '_health_check'): HealthCheckRequest.SerializeToString,
('BatchActionHandler', '_remote_execute'): BatchActionRequest.SerializeToString,
('BatchActionHandler', '_remote_reload'): ReloadRequest.SerializeToString,
}
response_deserializers = {
('BatchActionHandler', '_health_check'): HealthCheckResponse.FromString,
('BatchActionHandler', '_remote_execute'): BatchActionResponse.FromString,
('BatchActionHandler', '_remote_reload'): ReloadResponse.FromString,
}
cardinalities = {
'_health_check': cardinality.Cardinality.UNARY_UNARY,
'_remote_execute': cardinality.Cardinality.UNARY_UNARY,
'_remote_reload': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'BatchActionHandler', cardinalities, options=stub_options)
示例7: beta_create_ModelService_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_ModelService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.SerializeToString,
}
response_deserializers = {
('tensorflow.serving.ModelService', 'GetModelStatus'): tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.FromString,
}
cardinalities = {
'GetModelStatus': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'tensorflow.serving.ModelService', cardinalities, options=stub_options)
示例8: beta_create_ClusterSpecGenerator_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_ClusterSpecGenerator_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecRequest.SerializeToString,
('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerRequest.SerializeToString,
}
response_deserializers = {
('clusterspecgenerator.ClusterSpecGenerator', 'GetClusterSpec'): GetClusterSpecReply.FromString,
('clusterspecgenerator.ClusterSpecGenerator', 'RegisterContainer'): RegisterContainerReply.FromString,
}
cardinalities = {
'GetClusterSpec': cardinality.Cardinality.UNARY_UNARY,
'RegisterContainer': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'clusterspecgenerator.ClusterSpecGenerator', cardinalities, options=stub_options)
示例9: beta_create_CommandLine_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_CommandLine_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('command_line.CommandLine', 'Echo'): CommandRequest.SerializeToString,
}
response_deserializers = {
('command_line.CommandLine', 'Echo'): CommandResponse.FromString,
}
cardinalities = {
'Echo': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'command_line.CommandLine', cardinalities, options=stub_options)
示例10: beta_create_Health_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_Health_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('grpc.health.v1.Health', 'Check'): HealthCheckRequest.SerializeToString,
}
response_deserializers = {
('grpc.health.v1.Health', 'Check'): HealthCheckResponse.FromString,
}
cardinalities = {
'Check': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'grpc.health.v1.Health', cardinalities, options=stub_options)
示例11: beta_create_Publisher_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_Publisher_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('predix.eventhub.Publisher', 'send'): PublishRequest.SerializeToString,
}
response_deserializers = {
('predix.eventhub.Publisher', 'send'): PublishResponse.FromString,
}
cardinalities = {
'send': cardinality.Cardinality.STREAM_STREAM,
}
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 beta_implementations.dynamic_stub(channel, 'predix.eventhub.Publisher', cardinalities, options=stub_options)
示例12: beta_create_Subscriber_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_Subscriber_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('predix.eventhub.Subscriber', 'receive'): SubscriptionRequest.SerializeToString,
('predix.eventhub.Subscriber', 'receiveWithAcks'): SubscriptionResponse.SerializeToString,
('predix.eventhub.Subscriber', 'subscribe'): SubscriptionAcks.SerializeToString,
}
response_deserializers = {
('predix.eventhub.Subscriber', 'receive'): Message.FromString,
('predix.eventhub.Subscriber', 'receiveWithAcks'): Message.FromString,
('predix.eventhub.Subscriber', 'subscribe'): SubscriptionMessage.FromString,
}
cardinalities = {
'receive': cardinality.Cardinality.UNARY_STREAM,
'receiveWithAcks': cardinality.Cardinality.STREAM_STREAM,
'subscribe': cardinality.Cardinality.STREAM_STREAM,
}
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 beta_implementations.dynamic_stub(channel, 'predix.eventhub.Subscriber', cardinalities, options=stub_options)
示例13: beta_create_Calculator_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_Calculator_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('Calculator', 'SquareRoot'): Number.SerializeToString,
}
response_deserializers = {
('Calculator', 'SquareRoot'): Number.FromString,
}
cardinalities = {
'SquareRoot': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'Calculator', cardinalities, options=stub_options)
示例14: beta_create_Connector_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_Connector_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('qlik.sse.Connector', 'EvaluateScript'): BundledRows.SerializeToString,
('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.SerializeToString,
('qlik.sse.Connector', 'GetCapabilities'): Empty.SerializeToString,
}
response_deserializers = {
('qlik.sse.Connector', 'EvaluateScript'): BundledRows.FromString,
('qlik.sse.Connector', 'ExecuteFunction'): BundledRows.FromString,
('qlik.sse.Connector', 'GetCapabilities'): Capabilities.FromString,
}
cardinalities = {
'EvaluateScript': cardinality.Cardinality.STREAM_STREAM,
'ExecuteFunction': cardinality.Cardinality.STREAM_STREAM,
'GetCapabilities': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'qlik.sse.Connector', cardinalities, options=stub_options)
示例15: beta_create_NetworkServerManager_stub
# 需要导入模块: from grpc.beta import implementations [as 别名]
# 或者: from grpc.beta.implementations import dynamic_stub [as 别名]
def beta_create_NetworkServerManager_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=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_serializers = {
('networkserver.NetworkServerManager', 'GetStatus'): StatusRequest.SerializeToString,
}
response_deserializers = {
('networkserver.NetworkServerManager', 'GetStatus'): Status.FromString,
}
cardinalities = {
'GetStatus': cardinality.Cardinality.UNARY_UNARY,
}
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 beta_implementations.dynamic_stub(channel, 'networkserver.NetworkServerManager', cardinalities, options=stub_options)