def add_OrgServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=proto_dot_org__pb2.CreateOrgInfo.FromString,
            response_serializer=proto_dot_org__pb2.CreateOrgResult.
            SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=proto_dot_org__pb2.DeleteOrgInfo.FromString,
            response_serializer=proto_dot_org__pb2.DeleteOrgResult.
            SerializeToString,
        ),
        'Read':
        grpc.unary_unary_rpc_method_handler(
            servicer.Read,
            request_deserializer=proto_dot_org__pb2.ReadOrgInfo.FromString,
            response_serializer=proto_dot_org__pb2.ReadOrgResult.
            SerializeToString,
        ),
        'Update':
        grpc.unary_unary_rpc_method_handler(
            servicer.Update,
            request_deserializer=proto_dot_org__pb2.UpdateOrgInfo.FromString,
            response_serializer=proto_dot_org__pb2.UpdateOrgResult.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'proto.Org', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #2
0
def add_APIv1Servicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Query': grpc.unary_unary_rpc_method_handler(
          servicer.Query,
          request_deserializer=msg__pb2.QueryRequests.FromString,
          response_serializer=msg__pb2.QueryReplies.SerializeToString,
      ),
      'Result': grpc.unary_unary_rpc_method_handler(
          servicer.Result,
          request_deserializer=msg__pb2.RequestID.FromString,
          response_serializer=msg__pb2.QueryResult.SerializeToString,
      ),
      'Suggest': grpc.unary_unary_rpc_method_handler(
          servicer.Suggest,
          request_deserializer=msg__pb2.Suggestion.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'Stream': grpc.unary_stream_rpc_method_handler(
          servicer.Stream,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=msg__pb2.QueryResult.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'zvelo.msg.APIv1', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_IPythonServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'execute': grpc.unary_stream_rpc_method_handler(
          servicer.execute,
          request_deserializer=ipython__pb2.ExecuteRequest.FromString,
          response_serializer=ipython__pb2.ExecuteResponse.SerializeToString,
      ),
      'complete': grpc.unary_unary_rpc_method_handler(
          servicer.complete,
          request_deserializer=ipython__pb2.CompletionRequest.FromString,
          response_serializer=ipython__pb2.CompletionResponse.SerializeToString,
      ),
      'cancel': grpc.unary_unary_rpc_method_handler(
          servicer.cancel,
          request_deserializer=ipython__pb2.CancelRequest.FromString,
          response_serializer=ipython__pb2.CancelResponse.SerializeToString,
      ),
      'status': grpc.unary_unary_rpc_method_handler(
          servicer.status,
          request_deserializer=ipython__pb2.StatusRequest.FromString,
          response_serializer=ipython__pb2.StatusResponse.SerializeToString,
      ),
      'stop': grpc.unary_unary_rpc_method_handler(
          servicer.stop,
          request_deserializer=ipython__pb2.StopRequest.FromString,
          response_serializer=ipython__pb2.StopResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ipython.IPython', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_BigQueryStorageServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateReadSession": grpc.unary_unary_rpc_method_handler(
            servicer.CreateReadSession,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.CreateReadSessionRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.ReadSession.SerializeToString,
        ),
        "ReadRows": grpc.unary_stream_rpc_method_handler(
            servicer.ReadRows,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.ReadRowsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.ReadRowsResponse.SerializeToString,
        ),
        "BatchCreateReadSessionStreams": grpc.unary_unary_rpc_method_handler(
            servicer.BatchCreateReadSessionStreams,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.BatchCreateReadSessionStreamsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.BatchCreateReadSessionStreamsResponse.SerializeToString,
        ),
        "FinalizeStream": grpc.unary_unary_rpc_method_handler(
            servicer.FinalizeStream,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.FinalizeStreamRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "SplitReadStream": grpc.unary_unary_rpc_method_handler(
            servicer.SplitReadStream,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.SplitReadStreamRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.SplitReadStreamResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
def add_ProfileAnalysisServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'NewSession':
          grpc.unary_unary_rpc_method_handler(
              servicer.NewSession,
              request_deserializer=third__party_dot_tensorflow_dot_core_dot_profiler_dot_profiler__analysis__pb2
              .NewProfileSessionRequest.FromString,
              response_serializer=third__party_dot_tensorflow_dot_core_dot_profiler_dot_profiler__analysis__pb2
              .NewProfileSessionResponse.SerializeToString,
          ),
      'EnumSessions':
          grpc.unary_unary_rpc_method_handler(
              servicer.EnumSessions,
              request_deserializer=third__party_dot_tensorflow_dot_core_dot_profiler_dot_profiler__analysis__pb2
              .EnumProfileSessionsAndToolsRequest.FromString,
              response_serializer=third__party_dot_tensorflow_dot_core_dot_profiler_dot_profiler__analysis__pb2
              .EnumProfileSessionsAndToolsResponse.SerializeToString,
          ),
      'GetSessionToolData':
          grpc.unary_unary_rpc_method_handler(
              servicer.GetSessionToolData,
              request_deserializer=third__party_dot_tensorflow_dot_core_dot_profiler_dot_profiler__analysis__pb2
              .ProfileSessionDataRequest.FromString,
              response_serializer=third__party_dot_tensorflow_dot_core_dot_profiler_dot_profiler__analysis__pb2
              .ProfileSessionDataResponse.SerializeToString,
          ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'tensorflow.ProfileAnalysis', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #6
0
 def add_UsersServiceServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'validateAuthenticationToken': grpc.unary_unary_rpc_method_handler(
           servicer.validateAuthenticationToken,
           request_deserializer=ValidateAuthenticationTokenRequest.FromString,
           response_serializer=ValidateAuthenticationTokenResponse.SerializeToString,
       ),
       'getUserPermissions': grpc.unary_unary_rpc_method_handler(
           servicer.getUserPermissions,
           request_deserializer=GetUserPermissionsRequest.FromString,
           response_serializer=GetUserPermissionsResponse.SerializeToString,
       ),
       'getBOUserInfo': grpc.unary_unary_rpc_method_handler(
           servicer.getBOUserInfo,
           request_deserializer=GetBOUserInfoRequest.FromString,
           response_serializer=GetBOUserInfoResponse.SerializeToString,
       ),
       'getCustomerInfo': grpc.unary_unary_rpc_method_handler(
           servicer.getCustomerInfo,
           request_deserializer=GetCustomerInfoRequest.FromString,
           response_serializer=GetCustomerInfoResponse.SerializeToString,
       ),
       'setEntityOwner': grpc.unary_unary_rpc_method_handler(
           servicer.setEntityOwner,
           request_deserializer=SetEntityOwnerRequest.FromString,
           response_serializer=SetEntityOwnerResponse.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'soboto.users.UsersService', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
def add_MetricsServiceV2Servicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ListLogMetrics": grpc.unary_unary_rpc_method_handler(
            servicer.ListLogMetrics,
            request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.FromString,
            response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.SerializeToString,
        ),
        "GetLogMetric": grpc.unary_unary_rpc_method_handler(
            servicer.GetLogMetric,
            request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.FromString,
            response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString,
        ),
        "CreateLogMetric": grpc.unary_unary_rpc_method_handler(
            servicer.CreateLogMetric,
            request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.FromString,
            response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString,
        ),
        "UpdateLogMetric": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateLogMetric,
            request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.FromString,
            response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString,
        ),
        "DeleteLogMetric": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteLogMetric,
            request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.logging.v2.MetricsServiceV2", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
def add_PredictionServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Classify': grpc.unary_unary_rpc_method_handler(
          servicer.Classify,
          request_deserializer=tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationRequest.FromString,
          response_serializer=tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationResponse.SerializeToString,
      ),
      'Regress': grpc.unary_unary_rpc_method_handler(
          servicer.Regress,
          request_deserializer=tensorflow__serving_dot_apis_dot_regression__pb2.RegressionRequest.FromString,
          response_serializer=tensorflow__serving_dot_apis_dot_regression__pb2.RegressionResponse.SerializeToString,
      ),
      'Predict': grpc.unary_unary_rpc_method_handler(
          servicer.Predict,
          request_deserializer=tensorflow__serving_dot_apis_dot_predict__pb2.PredictRequest.FromString,
          response_serializer=tensorflow__serving_dot_apis_dot_predict__pb2.PredictResponse.SerializeToString,
      ),
      'MultiInference': grpc.unary_unary_rpc_method_handler(
          servicer.MultiInference,
          request_deserializer=tensorflow__serving_dot_apis_dot_inference__pb2.MultiInferenceRequest.FromString,
          response_serializer=tensorflow__serving_dot_apis_dot_inference__pb2.MultiInferenceResponse.SerializeToString,
      ),
      'GetModelMetadata': grpc.unary_unary_rpc_method_handler(
          servicer.GetModelMetadata,
          request_deserializer=tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataRequest.FromString,
          response_serializer=tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'tensorflow.serving.PredictionService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_ReferenceServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SearchReferenceSets': grpc.unary_unary_rpc_method_handler(
          servicer.SearchReferenceSets,
          request_deserializer=SearchReferenceSetsRequest.FromString,
          response_serializer=SearchReferenceSetsResponse.SerializeToString,
      ),
      'GetReferenceSet': grpc.unary_unary_rpc_method_handler(
          servicer.GetReferenceSet,
          request_deserializer=GetReferenceSetRequest.FromString,
          response_serializer=ga4gh_dot_references__pb2.ReferenceSet.SerializeToString,
      ),
      'SearchReferences': grpc.unary_unary_rpc_method_handler(
          servicer.SearchReferences,
          request_deserializer=SearchReferencesRequest.FromString,
          response_serializer=SearchReferencesResponse.SerializeToString,
      ),
      'GetReference': grpc.unary_unary_rpc_method_handler(
          servicer.GetReference,
          request_deserializer=GetReferenceRequest.FromString,
          response_serializer=ga4gh_dot_references__pb2.Reference.SerializeToString,
      ),
      'ListReferenceBases': grpc.unary_unary_rpc_method_handler(
          servicer.ListReferenceBases,
          request_deserializer=ListReferenceBasesRequest.FromString,
          response_serializer=ListReferenceBasesResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ga4gh.ReferenceService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_JNSafServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'LoadAPK': grpc.stream_unary_rpc_method_handler(
          servicer.LoadAPK,
          request_deserializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.LoadAPKRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.LoadAPKResponse.SerializeToString,
      ),
      'TaintAnalysis': grpc.unary_unary_rpc_method_handler(
          servicer.TaintAnalysis,
          request_deserializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.TaintAnalysisRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.TaintAnalysisResponse.SerializeToString,
      ),
      'GetSummary': grpc.unary_unary_rpc_method_handler(
          servicer.GetSummary,
          request_deserializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.GetSummaryRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.GetSummaryResponse.SerializeToString,
      ),
      'RegisterICC': grpc.unary_unary_rpc_method_handler(
          servicer.RegisterICC,
          request_deserializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.RegisterICCRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.RegisterICCResponse.SerializeToString,
      ),
      'RegisterTaint': grpc.unary_unary_rpc_method_handler(
          servicer.RegisterTaint,
          request_deserializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.RegisterTaintRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_jnsaf__grpc__pb2.RegisterTaintResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'jnsaf_server.JNSaf', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_CloudRedisServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ListInstances": grpc.unary_unary_rpc_method_handler(
            servicer.ListInstances,
            request_deserializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.ListInstancesRequest.FromString,
            response_serializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.ListInstancesResponse.SerializeToString,
        ),
        "GetInstance": grpc.unary_unary_rpc_method_handler(
            servicer.GetInstance,
            request_deserializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.GetInstanceRequest.FromString,
            response_serializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.Instance.SerializeToString,
        ),
        "CreateInstance": grpc.unary_unary_rpc_method_handler(
            servicer.CreateInstance,
            request_deserializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.CreateInstanceRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
        ),
        "UpdateInstance": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateInstance,
            request_deserializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.UpdateInstanceRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
        ),
        "DeleteInstance": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteInstance,
            request_deserializer=google_dot_cloud_dot_redis__v1_dot_proto_dot_cloud__redis__pb2.DeleteInstanceRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.redis.v1.CloudRedis", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
def add_ImageAnnotatorServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "BatchAnnotateImages": grpc.unary_unary_rpc_method_handler(
            servicer.BatchAnnotateImages,
            request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.FromString,
            response_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.SerializeToString,
        ),
        "BatchAnnotateFiles": grpc.unary_unary_rpc_method_handler(
            servicer.BatchAnnotateFiles,
            request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateFilesRequest.FromString,
            response_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateFilesResponse.SerializeToString,
        ),
        "AsyncBatchAnnotateImages": grpc.unary_unary_rpc_method_handler(
            servicer.AsyncBatchAnnotateImages,
            request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateImagesRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
        ),
        "AsyncBatchAnnotateFiles": grpc.unary_unary_rpc_method_handler(
            servicer.AsyncBatchAnnotateFiles,
            request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.vision.v1.ImageAnnotator", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
Exemple #13
0
def add_OperationsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetOperation': grpc.unary_unary_rpc_method_handler(
          servicer.GetOperation,
          request_deserializer=GetOperationRequest.FromString,
          response_serializer=Operation.SerializeToString,
      ),
      'ListOperations': grpc.unary_unary_rpc_method_handler(
          servicer.ListOperations,
          request_deserializer=ListOperationsRequest.FromString,
          response_serializer=ListOperationsResponse.SerializeToString,
      ),
      'CancelOperation': grpc.unary_unary_rpc_method_handler(
          servicer.CancelOperation,
          request_deserializer=CancelOperationRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'DeleteOperation': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteOperation,
          request_deserializer=DeleteOperationRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.longrunning.Operations', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_LoggingServiceV2Servicer_to_server(servicer, server):
  rpc_method_handlers = {
      'DeleteLog': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteLog,
          request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'WriteLogEntries': grpc.unary_unary_rpc_method_handler(
          servicer.WriteLogEntries,
          request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.FromString,
          response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.SerializeToString,
      ),
      'ListLogEntries': grpc.unary_unary_rpc_method_handler(
          servicer.ListLogEntries,
          request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.FromString,
          response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.SerializeToString,
      ),
      'ListMonitoredResourceDescriptors': grpc.unary_unary_rpc_method_handler(
          servicer.ListMonitoredResourceDescriptors,
          request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.FromString,
          response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.SerializeToString,
      ),
      'ListLogs': grpc.unary_unary_rpc_method_handler(
          servicer.ListLogs,
          request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.FromString,
          response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.logging.v2.LoggingServiceV2', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #15
0
def add_TableServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Range': grpc.unary_unary_rpc_method_handler(
          servicer.Range,
          request_deserializer=kv__rpc__pb2.RangeRequest.FromString,
          response_serializer=kv__rpc__pb2.RangeResponse.SerializeToString,
      ),
      'Put': grpc.unary_unary_rpc_method_handler(
          servicer.Put,
          request_deserializer=kv__rpc__pb2.PutRequest.FromString,
          response_serializer=kv__rpc__pb2.PutResponse.SerializeToString,
      ),
      'Delete': grpc.unary_unary_rpc_method_handler(
          servicer.Delete,
          request_deserializer=kv__rpc__pb2.DeleteRangeRequest.FromString,
          response_serializer=kv__rpc__pb2.DeleteRangeResponse.SerializeToString,
      ),
      'Txn': grpc.unary_unary_rpc_method_handler(
          servicer.Txn,
          request_deserializer=kv__rpc__pb2.TxnRequest.FromString,
          response_serializer=kv__rpc__pb2.TxnResponse.SerializeToString,
      ),
      'Increment': grpc.unary_unary_rpc_method_handler(
          servicer.Increment,
          request_deserializer=kv__rpc__pb2.IncrementRequest.FromString,
          response_serializer=kv__rpc__pb2.IncrementResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'bookkeeper.proto.kv.rpc.TableService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
 def add_FirestoreAdminServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'CreateIndex': grpc.unary_unary_rpc_method_handler(
           servicer.CreateIndex,
           request_deserializer=CreateIndexRequest.FromString,
           response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
       ),
       'ListIndexes': grpc.unary_unary_rpc_method_handler(
           servicer.ListIndexes,
           request_deserializer=ListIndexesRequest.FromString,
           response_serializer=ListIndexesResponse.SerializeToString,
       ),
       'GetIndex': grpc.unary_unary_rpc_method_handler(
           servicer.GetIndex,
           request_deserializer=GetIndexRequest.FromString,
           response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_admin_dot_index__pb2.Index.SerializeToString,
       ),
       'DeleteIndex': grpc.unary_unary_rpc_method_handler(
           servicer.DeleteIndex,
           request_deserializer=DeleteIndexRequest.FromString,
           response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'google.firestore.admin.v1beta1.FirestoreAdmin', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
def add_StructServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'create': grpc.unary_unary_rpc_method_handler(
          servicer.create,
          request_deserializer=Structure.FromString,
          response_serializer=Response.SerializeToString,
      ),
      'retrieve': grpc.unary_unary_rpc_method_handler(
          servicer.retrieve,
          request_deserializer=Empty.FromString,
          response_serializer=Structure.SerializeToString,
      ),
      'many': grpc.unary_unary_rpc_method_handler(
          servicer.many,
          request_deserializer=Empty.FromString,
          response_serializer=StructureList.SerializeToString,
      ),
      'bulk': grpc.unary_unary_rpc_method_handler(
          servicer.bulk,
          request_deserializer=StructureList.FromString,
          response_serializer=Response.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'structure.StructService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #18
0
def add_SaiyaServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Robot2Saiya': grpc.stream_stream_rpc_method_handler(
          servicer.Robot2Saiya,
          request_deserializer=crazy__rtc__pb2.CrazyMsg.FromString,
          response_serializer=crazy__rtc__pb2.CrazyMsg.SerializeToString,
      ),
      'Web2Saiya': grpc.stream_stream_rpc_method_handler(
          servicer.Web2Saiya,
          request_deserializer=crazy__rtc__pb2.CrazyMsg.FromString,
          response_serializer=crazy__rtc__pb2.CrazyMsg.SerializeToString,
      ),
      'Mobile2Saiya': grpc.stream_stream_rpc_method_handler(
          servicer.Mobile2Saiya,
          request_deserializer=crazy__rtc__pb2.CrazyMsg.FromString,
          response_serializer=crazy__rtc__pb2.CrazyMsg.SerializeToString,
      ),
      'GetDevList': grpc.unary_unary_rpc_method_handler(
          servicer.GetDevList,
          request_deserializer=crazy__rtc__pb2.EmailReq.FromString,
          response_serializer=crazy__rtc__pb2.DeviceList.SerializeToString,
      ),
      'GetDevInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetDevInfo,
          request_deserializer=crazy__rtc__pb2.DevReq.FromString,
          response_serializer=crazy__rtc__pb2.DeviceInfo.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'crazy_rtc.Saiya', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_NativeDroidServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GenSummary': grpc.unary_unary_rpc_method_handler(
          servicer.GenSummary,
          request_deserializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.GenSummaryRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.GenSummaryResponse.SerializeToString,
      ),
      'GetDynamicRegisterMap': grpc.unary_unary_rpc_method_handler(
          servicer.GetDynamicRegisterMap,
          request_deserializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.GetDynamicRegisterMapRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.GetDynamicRegisterMapResponse.SerializeToString,
      ),
      'HasSymbol': grpc.unary_unary_rpc_method_handler(
          servicer.HasSymbol,
          request_deserializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.HasSymbolRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.HasSymbolResponse.SerializeToString,
      ),
      'AnalyseNativeActivity': grpc.unary_unary_rpc_method_handler(
          servicer.AnalyseNativeActivity,
          request_deserializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.AnalyseNativeActivityRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.AnalyseNativeActivityResponse.SerializeToString,
      ),
      'LoadBinary': grpc.stream_unary_rpc_method_handler(
          servicer.LoadBinary,
          request_deserializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.LoadBinaryRequest.FromString,
          response_serializer=nativedroid_dot_protobuf_dot_nativedroid__grpc__pb2.LoadBinaryResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'nativedroid_server.NativeDroid', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_CompanyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateCompany": grpc.unary_unary_rpc_method_handler(
            servicer.CreateCompany,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__service__pb2.CreateCompanyRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__pb2.Company.SerializeToString,
        ),
        "GetCompany": grpc.unary_unary_rpc_method_handler(
            servicer.GetCompany,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__service__pb2.GetCompanyRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__pb2.Company.SerializeToString,
        ),
        "UpdateCompany": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateCompany,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__service__pb2.UpdateCompanyRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__pb2.Company.SerializeToString,
        ),
        "DeleteCompany": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteCompany,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__service__pb2.DeleteCompanyRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "ListCompanies": grpc.unary_unary_rpc_method_handler(
            servicer.ListCompanies,
            request_deserializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__service__pb2.ListCompaniesRequest.FromString,
            response_serializer=google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_company__service__pb2.ListCompaniesResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.talent.v4beta1.CompanyService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
def add_InstanceControlServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetFunctionStatus': grpc.unary_unary_rpc_method_handler(
          servicer.GetFunctionStatus,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=InstanceCommunication__pb2.FunctionStatus.SerializeToString,
      ),
      'GetAndResetMetrics': grpc.unary_unary_rpc_method_handler(
          servicer.GetAndResetMetrics,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=InstanceCommunication__pb2.MetricsData.SerializeToString,
      ),
      'ResetMetrics': grpc.unary_unary_rpc_method_handler(
          servicer.ResetMetrics,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'GetMetrics': grpc.unary_unary_rpc_method_handler(
          servicer.GetMetrics,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=InstanceCommunication__pb2.MetricsData.SerializeToString,
      ),
      'HealthCheck': grpc.unary_unary_rpc_method_handler(
          servicer.HealthCheck,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=InstanceCommunication__pb2.HealthCheckResult.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'proto.InstanceControl', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_AlertPolicyServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListAlertPolicies': grpc.unary_unary_rpc_method_handler(
          servicer.ListAlertPolicies,
          request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesRequest.FromString,
          response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesResponse.SerializeToString,
      ),
      'GetAlertPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetAlertPolicy,
          request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.GetAlertPolicyRequest.FromString,
          response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
      ),
      'CreateAlertPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.CreateAlertPolicy,
          request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.CreateAlertPolicyRequest.FromString,
          response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
      ),
      'DeleteAlertPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteAlertPolicy,
          request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.DeleteAlertPolicyRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'UpdateAlertPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateAlertPolicy,
          request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.UpdateAlertPolicyRequest.FromString,
          response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.monitoring.v3.AlertPolicyService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_ModelServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetModelStatus':
          grpc.unary_unary_rpc_method_handler(
              servicer.GetModelStatus,
              request_deserializer=
              tensorflow__serving_dot_apis_dot_get__model__status__pb2.
              GetModelStatusRequest.FromString,
              response_serializer=
              tensorflow__serving_dot_apis_dot_get__model__status__pb2.
              GetModelStatusResponse.SerializeToString,
          ),
      'HandleReloadConfigRequest':
          grpc.unary_unary_rpc_method_handler(
              servicer.HandleReloadConfigRequest,
              request_deserializer=
              tensorflow__serving_dot_apis_dot_model__management__pb2.
              ReloadConfigRequest.FromString,
              response_serializer=
              tensorflow__serving_dot_apis_dot_model__management__pb2.
              ReloadConfigResponse.SerializeToString,
          ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'tensorflow.serving.ModelService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_IndependentDiskServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=proto_dot_disk__pb2.CreateDiskInfo.FromString,
            response_serializer=proto_dot_disk__pb2.CreateDiskResult.
            SerializeToString,
        ),
        'Read':
        grpc.unary_unary_rpc_method_handler(
            servicer.Read,
            request_deserializer=proto_dot_disk__pb2.ReadDiskInfo.FromString,
            response_serializer=proto_dot_disk__pb2.ReadDiskResult.
            SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=proto_dot_disk__pb2.DeleteDiskInfo.FromString,
            response_serializer=proto_dot_disk__pb2.DeleteDiskResult.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'proto.IndependentDisk', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
 def add_MetricsServiceV2Servicer_to_server(servicer, server):
   rpc_method_handlers = {
       'ListLogMetrics': grpc.unary_unary_rpc_method_handler(
           servicer.ListLogMetrics,
           request_deserializer=ListLogMetricsRequest.FromString,
           response_serializer=ListLogMetricsResponse.SerializeToString,
       ),
       'GetLogMetric': grpc.unary_unary_rpc_method_handler(
           servicer.GetLogMetric,
           request_deserializer=GetLogMetricRequest.FromString,
           response_serializer=LogMetric.SerializeToString,
       ),
       'CreateLogMetric': grpc.unary_unary_rpc_method_handler(
           servicer.CreateLogMetric,
           request_deserializer=CreateLogMetricRequest.FromString,
           response_serializer=LogMetric.SerializeToString,
       ),
       'UpdateLogMetric': grpc.unary_unary_rpc_method_handler(
           servicer.UpdateLogMetric,
           request_deserializer=UpdateLogMetricRequest.FromString,
           response_serializer=LogMetric.SerializeToString,
       ),
       'DeleteLogMetric': grpc.unary_unary_rpc_method_handler(
           servicer.DeleteLogMetric,
           request_deserializer=DeleteLogMetricRequest.FromString,
           response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'google.logging.v2.MetricsServiceV2', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
def add_ModelServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetModel": grpc.unary_unary_rpc_method_handler(
            servicer.GetModel,
            request_deserializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.GetModelRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.Model.SerializeToString,
        ),
        "ListModels": grpc.unary_unary_rpc_method_handler(
            servicer.ListModels,
            request_deserializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.ListModelsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.ListModelsResponse.SerializeToString,
        ),
        "PatchModel": grpc.unary_unary_rpc_method_handler(
            servicer.PatchModel,
            request_deserializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.PatchModelRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.Model.SerializeToString,
        ),
        "DeleteModel": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteModel,
            request_deserializer=google_dot_cloud_dot_bigquery__v2_dot_proto_dot_model__pb2.DeleteModelRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.bigquery.v2.ModelService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
def add_WalletUnlockerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GenSeed': grpc.unary_unary_rpc_method_handler(
          servicer.GenSeed,
          request_deserializer=rpc__pb2.GenSeedRequest.FromString,
          response_serializer=rpc__pb2.GenSeedResponse.SerializeToString,
      ),
      'InitWallet': grpc.unary_unary_rpc_method_handler(
          servicer.InitWallet,
          request_deserializer=rpc__pb2.InitWalletRequest.FromString,
          response_serializer=rpc__pb2.InitWalletResponse.SerializeToString,
      ),
      'UnlockWallet': grpc.unary_unary_rpc_method_handler(
          servicer.UnlockWallet,
          request_deserializer=rpc__pb2.UnlockWalletRequest.FromString,
          response_serializer=rpc__pb2.UnlockWalletResponse.SerializeToString,
      ),
      'ChangePassword': grpc.unary_unary_rpc_method_handler(
          servicer.ChangePassword,
          request_deserializer=rpc__pb2.ChangePasswordRequest.FromString,
          response_serializer=rpc__pb2.ChangePasswordResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'lnrpc.WalletUnlocker', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_ThrottlerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'MaxRates': grpc.unary_unary_rpc_method_handler(
          servicer.MaxRates,
          request_deserializer=throttlerdata__pb2.MaxRatesRequest.FromString,
          response_serializer=throttlerdata__pb2.MaxRatesResponse.SerializeToString,
      ),
      'SetMaxRate': grpc.unary_unary_rpc_method_handler(
          servicer.SetMaxRate,
          request_deserializer=throttlerdata__pb2.SetMaxRateRequest.FromString,
          response_serializer=throttlerdata__pb2.SetMaxRateResponse.SerializeToString,
      ),
      'GetConfiguration': grpc.unary_unary_rpc_method_handler(
          servicer.GetConfiguration,
          request_deserializer=throttlerdata__pb2.GetConfigurationRequest.FromString,
          response_serializer=throttlerdata__pb2.GetConfigurationResponse.SerializeToString,
      ),
      'UpdateConfiguration': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateConfiguration,
          request_deserializer=throttlerdata__pb2.UpdateConfigurationRequest.FromString,
          response_serializer=throttlerdata__pb2.UpdateConfigurationResponse.SerializeToString,
      ),
      'ResetConfiguration': grpc.unary_unary_rpc_method_handler(
          servicer.ResetConfiguration,
          request_deserializer=throttlerdata__pb2.ResetConfigurationRequest.FromString,
          response_serializer=throttlerdata__pb2.ResetConfigurationResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'throttlerservice.Throttler', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_DataManagerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'DeleteAlbum': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteAlbum,
          request_deserializer=mmp__pb2.MediaData.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'DeleteSong': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteSong,
          request_deserializer=mmp__pb2.MediaData.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'RenameAlbum': grpc.unary_unary_rpc_method_handler(
          servicer.RenameAlbum,
          request_deserializer=mmp__pb2.RenameData.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'RenameSong': grpc.unary_unary_rpc_method_handler(
          servicer.RenameSong,
          request_deserializer=mmp__pb2.RenameData.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'MoveSong': grpc.unary_unary_rpc_method_handler(
          servicer.MoveSong,
          request_deserializer=mmp__pb2.MoveData.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grpc.DataManager', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #30
0
def add_AdminServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetStatus': grpc.unary_unary_rpc_method_handler(
          servicer.GetStatus,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=peer_dot_admin__pb2.ServerStatus.SerializeToString,
      ),
      'StartServer': grpc.unary_unary_rpc_method_handler(
          servicer.StartServer,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=peer_dot_admin__pb2.ServerStatus.SerializeToString,
      ),
      'StopServer': grpc.unary_unary_rpc_method_handler(
          servicer.StopServer,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=peer_dot_admin__pb2.ServerStatus.SerializeToString,
      ),
      'GetModuleLogLevel': grpc.unary_unary_rpc_method_handler(
          servicer.GetModuleLogLevel,
          request_deserializer=peer_dot_admin__pb2.LogLevelRequest.FromString,
          response_serializer=peer_dot_admin__pb2.LogLevelResponse.SerializeToString,
      ),
      'SetModuleLogLevel': grpc.unary_unary_rpc_method_handler(
          servicer.SetModuleLogLevel,
          request_deserializer=peer_dot_admin__pb2.LogLevelRequest.FromString,
          response_serializer=peer_dot_admin__pb2.LogLevelResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'protos.Admin', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #31
0
def add_WorkflowAPIServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'UpsertWorkflow':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpsertWorkflow,
            request_deserializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            UpsertWorkflowRequest.FromString,
            response_serializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            Workflow.SerializeToString,
        ),
        'GetWorkflow':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetWorkflow,
            request_deserializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            GetWorkflowRequest.FromString,
            response_serializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            Workflow.SerializeToString,
        ),
        'GetVersion':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetVersion,
            request_deserializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            GetVersionRequest.FromString,
            response_serializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            VersionedGraft.SerializeToString,
        ),
        'SearchWorkflows':
        grpc.unary_stream_rpc_method_handler(
            servicer.SearchWorkflows,
            request_deserializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            SearchWorkflowsRequest.FromString,
            response_serializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            Workflow.SerializeToString,
        ),
        'DeleteWorkflow':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteWorkflow,
            request_deserializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            DeleteWorkflowRequest.FromString,
            response_serializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            Empty.SerializeToString,
        ),
        'GetWmtsUrlTemplate':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetWmtsUrlTemplate,
            request_deserializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            Empty.FromString,
            response_serializer=
            descarteslabs_dot_common_dot_proto_dot_workflow_dot_workflow__pb2.
            WmtsUrlTemplateResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'descarteslabs.workflows.WorkflowAPI', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_QueryServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Execute': grpc.unary_unary_rpc_method_handler(
          servicer.Execute,
          request_deserializer=query__pb2.ExecuteRequest.FromString,
          response_serializer=query__pb2.ExecuteResponse.SerializeToString,
      ),
      'ExecuteBatch': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteBatch,
          request_deserializer=query__pb2.ExecuteBatchRequest.FromString,
          response_serializer=query__pb2.ExecuteBatchResponse.SerializeToString,
      ),
      'StreamExecute': grpc.unary_stream_rpc_method_handler(
          servicer.StreamExecute,
          request_deserializer=query__pb2.StreamExecuteRequest.FromString,
          response_serializer=query__pb2.StreamExecuteResponse.SerializeToString,
      ),
      'Begin': grpc.unary_unary_rpc_method_handler(
          servicer.Begin,
          request_deserializer=query__pb2.BeginRequest.FromString,
          response_serializer=query__pb2.BeginResponse.SerializeToString,
      ),
      'Commit': grpc.unary_unary_rpc_method_handler(
          servicer.Commit,
          request_deserializer=query__pb2.CommitRequest.FromString,
          response_serializer=query__pb2.CommitResponse.SerializeToString,
      ),
      'Rollback': grpc.unary_unary_rpc_method_handler(
          servicer.Rollback,
          request_deserializer=query__pb2.RollbackRequest.FromString,
          response_serializer=query__pb2.RollbackResponse.SerializeToString,
      ),
      'Prepare': grpc.unary_unary_rpc_method_handler(
          servicer.Prepare,
          request_deserializer=query__pb2.PrepareRequest.FromString,
          response_serializer=query__pb2.PrepareResponse.SerializeToString,
      ),
      'CommitPrepared': grpc.unary_unary_rpc_method_handler(
          servicer.CommitPrepared,
          request_deserializer=query__pb2.CommitPreparedRequest.FromString,
          response_serializer=query__pb2.CommitPreparedResponse.SerializeToString,
      ),
      'RollbackPrepared': grpc.unary_unary_rpc_method_handler(
          servicer.RollbackPrepared,
          request_deserializer=query__pb2.RollbackPreparedRequest.FromString,
          response_serializer=query__pb2.RollbackPreparedResponse.SerializeToString,
      ),
      'CreateTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.CreateTransaction,
          request_deserializer=query__pb2.CreateTransactionRequest.FromString,
          response_serializer=query__pb2.CreateTransactionResponse.SerializeToString,
      ),
      'StartCommit': grpc.unary_unary_rpc_method_handler(
          servicer.StartCommit,
          request_deserializer=query__pb2.StartCommitRequest.FromString,
          response_serializer=query__pb2.StartCommitResponse.SerializeToString,
      ),
      'SetRollback': grpc.unary_unary_rpc_method_handler(
          servicer.SetRollback,
          request_deserializer=query__pb2.SetRollbackRequest.FromString,
          response_serializer=query__pb2.SetRollbackResponse.SerializeToString,
      ),
      'ConcludeTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.ConcludeTransaction,
          request_deserializer=query__pb2.ConcludeTransactionRequest.FromString,
          response_serializer=query__pb2.ConcludeTransactionResponse.SerializeToString,
      ),
      'ReadTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.ReadTransaction,
          request_deserializer=query__pb2.ReadTransactionRequest.FromString,
          response_serializer=query__pb2.ReadTransactionResponse.SerializeToString,
      ),
      'BeginExecute': grpc.unary_unary_rpc_method_handler(
          servicer.BeginExecute,
          request_deserializer=query__pb2.BeginExecuteRequest.FromString,
          response_serializer=query__pb2.BeginExecuteResponse.SerializeToString,
      ),
      'BeginExecuteBatch': grpc.unary_unary_rpc_method_handler(
          servicer.BeginExecuteBatch,
          request_deserializer=query__pb2.BeginExecuteBatchRequest.FromString,
          response_serializer=query__pb2.BeginExecuteBatchResponse.SerializeToString,
      ),
      'MessageStream': grpc.unary_stream_rpc_method_handler(
          servicer.MessageStream,
          request_deserializer=query__pb2.MessageStreamRequest.FromString,
          response_serializer=query__pb2.MessageStreamResponse.SerializeToString,
      ),
      'MessageAck': grpc.unary_unary_rpc_method_handler(
          servicer.MessageAck,
          request_deserializer=query__pb2.MessageAckRequest.FromString,
          response_serializer=query__pb2.MessageAckResponse.SerializeToString,
      ),
      'SplitQuery': grpc.unary_unary_rpc_method_handler(
          servicer.SplitQuery,
          request_deserializer=query__pb2.SplitQueryRequest.FromString,
          response_serializer=query__pb2.SplitQueryResponse.SerializeToString,
      ),
      'StreamHealth': grpc.unary_stream_rpc_method_handler(
          servicer.StreamHealth,
          request_deserializer=query__pb2.StreamHealthRequest.FromString,
          response_serializer=query__pb2.StreamHealthResponse.SerializeToString,
      ),
      'UpdateStream': grpc.unary_stream_rpc_method_handler(
          servicer.UpdateStream,
          request_deserializer=query__pb2.UpdateStreamRequest.FromString,
          response_serializer=query__pb2.UpdateStreamResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'queryservice.Query', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #33
0
def add_EagerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateContext':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateContext,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            CreateContextRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            CreateContextResponse.SerializeToString,
        ),
        'UpdateContext':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateContext,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            UpdateContextRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            UpdateContextResponse.SerializeToString,
        ),
        'Enqueue':
        grpc.unary_unary_rpc_method_handler(
            servicer.Enqueue,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            EnqueueRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            EnqueueResponse.SerializeToString,
        ),
        'StreamingEnqueue':
        grpc.stream_stream_rpc_method_handler(
            servicer.StreamingEnqueue,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            EnqueueRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            EnqueueResponse.SerializeToString,
        ),
        'WaitQueueDone':
        grpc.unary_unary_rpc_method_handler(
            servicer.WaitQueueDone,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            WaitQueueDoneRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            WaitQueueDoneResponse.SerializeToString,
        ),
        'RunComponentFunction':
        grpc.unary_unary_rpc_method_handler(
            servicer.RunComponentFunction,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            RunComponentFunctionRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            RunComponentFunctionResponse.SerializeToString,
        ),
        'KeepAlive':
        grpc.unary_unary_rpc_method_handler(
            servicer.KeepAlive,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            KeepAliveRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            KeepAliveResponse.SerializeToString,
        ),
        'CloseContext':
        grpc.unary_unary_rpc_method_handler(
            servicer.CloseContext,
            request_deserializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            CloseContextRequest.FromString,
            response_serializer=
            tensorflow_dot_core_dot_protobuf_dot_eager__service__pb2.
            CloseContextResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'tensorflow.eager.EagerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #34
0
def add_TensorBoardDataProviderServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetExperiment':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetExperiment,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            GetExperimentRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            GetExperimentResponse.SerializeToString,
        ),
        'ListPlugins':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListPlugins,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListPluginsRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListPluginsResponse.SerializeToString,
        ),
        'ListRuns':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListRuns,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListRunsRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListRunsResponse.SerializeToString,
        ),
        'ListScalars':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListScalars,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListScalarsRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListScalarsResponse.SerializeToString,
        ),
        'ReadScalars':
        grpc.unary_unary_rpc_method_handler(
            servicer.ReadScalars,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadScalarsRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadScalarsResponse.SerializeToString,
        ),
        'ListTensors':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListTensors,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListTensorsRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListTensorsResponse.SerializeToString,
        ),
        'ReadTensors':
        grpc.unary_unary_rpc_method_handler(
            servicer.ReadTensors,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadTensorsRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadTensorsResponse.SerializeToString,
        ),
        'ListBlobSequences':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListBlobSequences,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListBlobSequencesRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ListBlobSequencesResponse.SerializeToString,
        ),
        'ReadBlobSequences':
        grpc.unary_unary_rpc_method_handler(
            servicer.ReadBlobSequences,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadBlobSequencesRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadBlobSequencesResponse.SerializeToString,
        ),
        'ReadBlob':
        grpc.unary_stream_rpc_method_handler(
            servicer.ReadBlob,
            request_deserializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadBlobRequest.FromString,
            response_serializer=
            tensorboard_dot_data_dot_proto_dot_data__provider__pb2.
            ReadBlobResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'tensorboard.data.TensorBoardDataProvider', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_ClusterServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.GetClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__pb2.Cluster.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClustersRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClustersResponse.SerializeToString,
      ),
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.CreateClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.UpdateClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Delete': grpc.unary_unary_rpc_method_handler(
          servicer.Delete,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.DeleteClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Start': grpc.unary_unary_rpc_method_handler(
          servicer.Start,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.StartClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Stop': grpc.unary_unary_rpc_method_handler(
          servicer.Stop,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.StopClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Backup': grpc.unary_unary_rpc_method_handler(
          servicer.Backup,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.BackupClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Restore': grpc.unary_unary_rpc_method_handler(
          servicer.Restore,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.RestoreClusterRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'ListLogs': grpc.unary_unary_rpc_method_handler(
          servicer.ListLogs,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterLogsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterLogsResponse.SerializeToString,
      ),
      'ListOperations': grpc.unary_unary_rpc_method_handler(
          servicer.ListOperations,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterOperationsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterOperationsResponse.SerializeToString,
      ),
      'ListBackups': grpc.unary_unary_rpc_method_handler(
          servicer.ListBackups,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterBackupsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterBackupsResponse.SerializeToString,
      ),
      'ListHosts': grpc.unary_unary_rpc_method_handler(
          servicer.ListHosts,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterHostsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.ListClusterHostsResponse.SerializeToString,
      ),
      'AddHosts': grpc.unary_unary_rpc_method_handler(
          servicer.AddHosts,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.AddClusterHostsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'DeleteHosts': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteHosts,
          request_deserializer=yandex_dot_cloud_dot_mdb_dot_mysql_dot_v1alpha_dot_cluster__service__pb2.DeleteClusterHostsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.mdb.mysql.v1alpha.ClusterService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #36
0
 def service(self, handler_call_details):
     return grpc.unary_unary_rpc_method_handler(lambda x, _: x)
Exemple #37
0
def add_KiwoomOpenApiServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Call':
        grpc.unary_unary_rpc_method_handler(
            servicer.Call,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallResponse.SerializeToString,
        ),
        'Listen':
        grpc.unary_stream_rpc_method_handler(
            servicer.Listen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'BidirectionalListen':
        grpc.stream_stream_rpc_method_handler(
            servicer.BidirectionalListen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            BidirectionalListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'CustomListen':
        grpc.unary_stream_rpc_method_handler(
            servicer.CustomListen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'CustomCallAndListen':
        grpc.unary_stream_rpc_method_handler(
            servicer.CustomCallAndListen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallAndListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallAndListenResponse.SerializeToString,
        ),
        'LoginCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.LoginCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            LoginRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'TransactionCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.TransactionCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            TransactionRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'OrderCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.OrderCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            OrderRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'RealCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.RealCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            RealRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'LoadConditionCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.LoadConditionCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            LoadConditionRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'ConditionCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.ConditionCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ConditionRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'BidirectionalRealCall':
        grpc.stream_stream_rpc_method_handler(
            servicer.BidirectionalRealCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            BidirectionalRealRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'OrderListen':
        grpc.unary_stream_rpc_method_handler(
            servicer.OrderListen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'SetLogLevel':
        grpc.unary_unary_rpc_method_handler(
            servicer.SetLogLevel,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            SetLogLevelRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            SetLogLevelResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'koapy.grpc.KiwoomOpenApiService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_ProjectionsServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=projections__pb2.CreateReq.FromString,
            response_serializer=projections__pb2.CreateResp.SerializeToString,
        ),
        'Update':
        grpc.unary_unary_rpc_method_handler(
            servicer.Update,
            request_deserializer=projections__pb2.UpdateReq.FromString,
            response_serializer=projections__pb2.UpdateResp.SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=projections__pb2.DeleteReq.FromString,
            response_serializer=projections__pb2.DeleteResp.SerializeToString,
        ),
        'Statistics':
        grpc.unary_stream_rpc_method_handler(
            servicer.Statistics,
            request_deserializer=projections__pb2.StatisticsReq.FromString,
            response_serializer=projections__pb2.StatisticsResp.
            SerializeToString,
        ),
        'Disable':
        grpc.unary_unary_rpc_method_handler(
            servicer.Disable,
            request_deserializer=projections__pb2.DisableReq.FromString,
            response_serializer=projections__pb2.DisableResp.SerializeToString,
        ),
        'Enable':
        grpc.unary_unary_rpc_method_handler(
            servicer.Enable,
            request_deserializer=projections__pb2.EnableReq.FromString,
            response_serializer=projections__pb2.EnableResp.SerializeToString,
        ),
        'Reset':
        grpc.unary_unary_rpc_method_handler(
            servicer.Reset,
            request_deserializer=projections__pb2.ResetReq.FromString,
            response_serializer=projections__pb2.ResetResp.SerializeToString,
        ),
        'State':
        grpc.unary_unary_rpc_method_handler(
            servicer.State,
            request_deserializer=projections__pb2.StateReq.FromString,
            response_serializer=projections__pb2.StateResp.SerializeToString,
        ),
        'Result':
        grpc.unary_unary_rpc_method_handler(
            servicer.Result,
            request_deserializer=projections__pb2.ResultReq.FromString,
            response_serializer=projections__pb2.ResultResp.SerializeToString,
        ),
        'RestartSubsystem':
        grpc.unary_unary_rpc_method_handler(
            servicer.RestartSubsystem,
            request_deserializer=shared__pb2.Empty.FromString,
            response_serializer=shared__pb2.Empty.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'event_store.client.projections.Projections', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_DaprServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'InvokeService':
        grpc.unary_unary_rpc_method_handler(
            servicer.InvokeService,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeServiceRequest.FromString,
            response_serializer=dapr_dot_proto_dot_common_dot_v1_dot_common__pb2
            .InvokeResponse.SerializeToString,
        ),
        'GetState':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetStateRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetStateResponse.SerializeToString,
        ),
        'GetBulkState':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetBulkState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetBulkStateRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetBulkStateResponse.SerializeToString,
        ),
        'SaveState':
        grpc.unary_unary_rpc_method_handler(
            servicer.SaveState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .SaveStateRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'QueryStateAlpha1':
        grpc.unary_unary_rpc_method_handler(
            servicer.QueryStateAlpha1,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .QueryStateRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .QueryStateResponse.SerializeToString,
        ),
        'DeleteState':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .DeleteStateRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'DeleteBulkState':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteBulkState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .DeleteBulkStateRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'ExecuteStateTransaction':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteStateTransaction,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .ExecuteStateTransactionRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'PublishEvent':
        grpc.unary_unary_rpc_method_handler(
            servicer.PublishEvent,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .PublishEventRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'InvokeBinding':
        grpc.unary_unary_rpc_method_handler(
            servicer.InvokeBinding,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeBindingRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeBindingResponse.SerializeToString,
        ),
        'GetSecret':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetSecret,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetSecretRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetSecretResponse.SerializeToString,
        ),
        'GetBulkSecret':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetBulkSecret,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetBulkSecretRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetBulkSecretResponse.SerializeToString,
        ),
        'RegisterActorTimer':
        grpc.unary_unary_rpc_method_handler(
            servicer.RegisterActorTimer,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .RegisterActorTimerRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'UnregisterActorTimer':
        grpc.unary_unary_rpc_method_handler(
            servicer.UnregisterActorTimer,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .UnregisterActorTimerRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'RegisterActorReminder':
        grpc.unary_unary_rpc_method_handler(
            servicer.RegisterActorReminder,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .RegisterActorReminderRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'UnregisterActorReminder':
        grpc.unary_unary_rpc_method_handler(
            servicer.UnregisterActorReminder,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .UnregisterActorReminderRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'GetActorState':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetActorState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetActorStateRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetActorStateResponse.SerializeToString,
        ),
        'ExecuteActorStateTransaction':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteActorStateTransaction,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .ExecuteActorStateTransactionRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'InvokeActor':
        grpc.unary_unary_rpc_method_handler(
            servicer.InvokeActor,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeActorRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeActorResponse.SerializeToString,
        ),
        'GetConfigurationAlpha1':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetConfigurationAlpha1,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetConfigurationRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetConfigurationResponse.SerializeToString,
        ),
        'SubscribeConfigurationAlpha1':
        grpc.unary_stream_rpc_method_handler(
            servicer.SubscribeConfigurationAlpha1,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .SubscribeConfigurationRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .SubscribeConfigurationResponse.SerializeToString,
        ),
        'GetMetadata':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetMetadata,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetMetadataResponse.SerializeToString,
        ),
        'SetMetadata':
        grpc.unary_unary_rpc_method_handler(
            servicer.SetMetadata,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .SetMetadataRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'Shutdown':
        grpc.unary_unary_rpc_method_handler(
            servicer.Shutdown,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'dapr.proto.runtime.v1.Dapr', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_ContextsServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'ListContexts':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListContexts,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            ListContextsRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            ListContextsResponse.SerializeToString,
        ),
        'GetContext':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetContext,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            GetContextRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            Context.SerializeToString,
        ),
        'CreateContext':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateContext,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            CreateContextRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            Context.SerializeToString,
        ),
        'UpdateContext':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateContext,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            UpdateContextRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            Context.SerializeToString,
        ),
        'DeleteContext':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteContext,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            DeleteContextRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'DeleteAllContexts':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteAllContexts,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.
            DeleteAllContextsRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'google.cloud.dialogflow.v2.Contexts', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #41
0
def add_GRPCBinServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Index':
        grpc.unary_unary_rpc_method_handler(
            servicer.Index,
            request_deserializer=grpcbin__pb2.EmptyMessage.FromString,
            response_serializer=grpcbin__pb2.IndexReply.SerializeToString,
        ),
        'Empty':
        grpc.unary_unary_rpc_method_handler(
            servicer.Empty,
            request_deserializer=grpcbin__pb2.EmptyMessage.FromString,
            response_serializer=grpcbin__pb2.EmptyMessage.SerializeToString,
        ),
        'DummyUnary':
        grpc.unary_unary_rpc_method_handler(
            servicer.DummyUnary,
            request_deserializer=grpcbin__pb2.DummyMessage.FromString,
            response_serializer=grpcbin__pb2.DummyMessage.SerializeToString,
        ),
        'DummyServerStream':
        grpc.unary_stream_rpc_method_handler(
            servicer.DummyServerStream,
            request_deserializer=grpcbin__pb2.DummyMessage.FromString,
            response_serializer=grpcbin__pb2.DummyMessage.SerializeToString,
        ),
        'DummyClientStream':
        grpc.stream_unary_rpc_method_handler(
            servicer.DummyClientStream,
            request_deserializer=grpcbin__pb2.DummyMessage.FromString,
            response_serializer=grpcbin__pb2.DummyMessage.SerializeToString,
        ),
        'DummyBidirectionalStreamStream':
        grpc.stream_stream_rpc_method_handler(
            servicer.DummyBidirectionalStreamStream,
            request_deserializer=grpcbin__pb2.DummyMessage.FromString,
            response_serializer=grpcbin__pb2.DummyMessage.SerializeToString,
        ),
        'SpecificError':
        grpc.unary_unary_rpc_method_handler(
            servicer.SpecificError,
            request_deserializer=grpcbin__pb2.SpecificErrorRequest.FromString,
            response_serializer=grpcbin__pb2.EmptyMessage.SerializeToString,
        ),
        'RandomError':
        grpc.unary_unary_rpc_method_handler(
            servicer.RandomError,
            request_deserializer=grpcbin__pb2.EmptyMessage.FromString,
            response_serializer=grpcbin__pb2.EmptyMessage.SerializeToString,
        ),
        'HeadersUnary':
        grpc.unary_unary_rpc_method_handler(
            servicer.HeadersUnary,
            request_deserializer=grpcbin__pb2.EmptyMessage.FromString,
            response_serializer=grpcbin__pb2.HeadersMessage.SerializeToString,
        ),
        'NoResponseUnary':
        grpc.unary_unary_rpc_method_handler(
            servicer.NoResponseUnary,
            request_deserializer=grpcbin__pb2.EmptyMessage.FromString,
            response_serializer=grpcbin__pb2.EmptyMessage.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'grpcbin.GRPCBin', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_UserServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'List':
        grpc.unary_unary_rpc_method_handler(
            servicer.List,
            request_deserializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            ListUserRequest.FromString,
            response_serializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            ListUserResponse.SerializeToString,
        ),
        'Get':
        grpc.unary_unary_rpc_method_handler(
            servicer.Get,
            request_deserializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            GetUserRequest.FromString,
            response_serializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            GetUserResponse.SerializeToString,
        ),
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            CreateUserRequest.FromString,
            response_serializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            CreateUserResponse.SerializeToString,
        ),
        'Update':
        grpc.unary_unary_rpc_method_handler(
            servicer.Update,
            request_deserializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            UpdateUserRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            DeleteUserRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'UpdatePassword':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdatePassword,
            request_deserializer=
            chirpstack__api_dot_as__pb_dot_external_dot_api_dot_user__pb2.
            UpdateUserPasswordRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'api.UserService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #43
0
def add_RegistryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Get':
        grpc.unary_unary_rpc_method_handler(
            servicer.Get,
            request_deserializer=
            yandex_dot_cloud_dot_containerregistry_dot_v1_dot_registry__service__pb2
            .GetRegistryRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_containerregistry_dot_v1_dot_registry__pb2.
            Registry.SerializeToString,
        ),
        'List':
        grpc.unary_unary_rpc_method_handler(
            servicer.List,
            request_deserializer=
            yandex_dot_cloud_dot_containerregistry_dot_v1_dot_registry__service__pb2
            .ListRegistriesRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_containerregistry_dot_v1_dot_registry__service__pb2
            .ListRegistriesResponse.SerializeToString,
        ),
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=
            yandex_dot_cloud_dot_containerregistry_dot_v1_dot_registry__service__pb2
            .CreateRegistryRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Update':
        grpc.unary_unary_rpc_method_handler(
            servicer.Update,
            request_deserializer=
            yandex_dot_cloud_dot_containerregistry_dot_v1_dot_registry__service__pb2
            .UpdateRegistryRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=
            yandex_dot_cloud_dot_containerregistry_dot_v1_dot_registry__service__pb2
            .DeleteRegistryRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'ListAccessBindings':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListAccessBindings,
            request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.
            ListAccessBindingsRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.
            ListAccessBindingsResponse.SerializeToString,
        ),
        'SetAccessBindings':
        grpc.unary_unary_rpc_method_handler(
            servicer.SetAccessBindings,
            request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.
            SetAccessBindingsRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'UpdateAccessBindings':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateAccessBindings,
            request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.
            UpdateAccessBindingsRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'yandex.cloud.containerregistry.v1.RegistryService',
        rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_VitessServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Execute':
        grpc.unary_unary_rpc_method_handler(
            servicer.Execute,
            request_deserializer=vtgate__pb2.ExecuteRequest.FromString,
            response_serializer=vtgate__pb2.ExecuteResponse.SerializeToString,
        ),
        'ExecuteBatch':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteBatch,
            request_deserializer=vtgate__pb2.ExecuteBatchRequest.FromString,
            response_serializer=vtgate__pb2.ExecuteBatchResponse.
            SerializeToString,
        ),
        'StreamExecute':
        grpc.unary_stream_rpc_method_handler(
            servicer.StreamExecute,
            request_deserializer=vtgate__pb2.StreamExecuteRequest.FromString,
            response_serializer=vtgate__pb2.StreamExecuteResponse.
            SerializeToString,
        ),
        'ExecuteShards':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteShards,
            request_deserializer=vtgate__pb2.ExecuteShardsRequest.FromString,
            response_serializer=vtgate__pb2.ExecuteShardsResponse.
            SerializeToString,
        ),
        'ExecuteKeyspaceIds':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteKeyspaceIds,
            request_deserializer=vtgate__pb2.ExecuteKeyspaceIdsRequest.
            FromString,
            response_serializer=vtgate__pb2.ExecuteKeyspaceIdsResponse.
            SerializeToString,
        ),
        'ExecuteKeyRanges':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteKeyRanges,
            request_deserializer=vtgate__pb2.ExecuteKeyRangesRequest.
            FromString,
            response_serializer=vtgate__pb2.ExecuteKeyRangesResponse.
            SerializeToString,
        ),
        'ExecuteEntityIds':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteEntityIds,
            request_deserializer=vtgate__pb2.ExecuteEntityIdsRequest.
            FromString,
            response_serializer=vtgate__pb2.ExecuteEntityIdsResponse.
            SerializeToString,
        ),
        'ExecuteBatchShards':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteBatchShards,
            request_deserializer=vtgate__pb2.ExecuteBatchShardsRequest.
            FromString,
            response_serializer=vtgate__pb2.ExecuteBatchShardsResponse.
            SerializeToString,
        ),
        'ExecuteBatchKeyspaceIds':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteBatchKeyspaceIds,
            request_deserializer=vtgate__pb2.ExecuteBatchKeyspaceIdsRequest.
            FromString,
            response_serializer=vtgate__pb2.ExecuteBatchKeyspaceIdsResponse.
            SerializeToString,
        ),
        'StreamExecuteShards':
        grpc.unary_stream_rpc_method_handler(
            servicer.StreamExecuteShards,
            request_deserializer=vtgate__pb2.StreamExecuteShardsRequest.
            FromString,
            response_serializer=vtgate__pb2.StreamExecuteShardsResponse.
            SerializeToString,
        ),
        'StreamExecuteKeyspaceIds':
        grpc.unary_stream_rpc_method_handler(
            servicer.StreamExecuteKeyspaceIds,
            request_deserializer=vtgate__pb2.StreamExecuteKeyspaceIdsRequest.
            FromString,
            response_serializer=vtgate__pb2.StreamExecuteKeyspaceIdsResponse.
            SerializeToString,
        ),
        'StreamExecuteKeyRanges':
        grpc.unary_stream_rpc_method_handler(
            servicer.StreamExecuteKeyRanges,
            request_deserializer=vtgate__pb2.StreamExecuteKeyRangesRequest.
            FromString,
            response_serializer=vtgate__pb2.StreamExecuteKeyRangesResponse.
            SerializeToString,
        ),
        'Begin':
        grpc.unary_unary_rpc_method_handler(
            servicer.Begin,
            request_deserializer=vtgate__pb2.BeginRequest.FromString,
            response_serializer=vtgate__pb2.BeginResponse.SerializeToString,
        ),
        'Commit':
        grpc.unary_unary_rpc_method_handler(
            servicer.Commit,
            request_deserializer=vtgate__pb2.CommitRequest.FromString,
            response_serializer=vtgate__pb2.CommitResponse.SerializeToString,
        ),
        'Rollback':
        grpc.unary_unary_rpc_method_handler(
            servicer.Rollback,
            request_deserializer=vtgate__pb2.RollbackRequest.FromString,
            response_serializer=vtgate__pb2.RollbackResponse.SerializeToString,
        ),
        'ResolveTransaction':
        grpc.unary_unary_rpc_method_handler(
            servicer.ResolveTransaction,
            request_deserializer=vtgate__pb2.ResolveTransactionRequest.
            FromString,
            response_serializer=vtgate__pb2.ResolveTransactionResponse.
            SerializeToString,
        ),
        'MessageStream':
        grpc.unary_stream_rpc_method_handler(
            servicer.MessageStream,
            request_deserializer=vtgate__pb2.MessageStreamRequest.FromString,
            response_serializer=query__pb2.MessageStreamResponse.
            SerializeToString,
        ),
        'MessageAck':
        grpc.unary_unary_rpc_method_handler(
            servicer.MessageAck,
            request_deserializer=vtgate__pb2.MessageAckRequest.FromString,
            response_serializer=query__pb2.MessageAckResponse.
            SerializeToString,
        ),
        'MessageAckKeyspaceIds':
        grpc.unary_unary_rpc_method_handler(
            servicer.MessageAckKeyspaceIds,
            request_deserializer=vtgate__pb2.MessageAckKeyspaceIdsRequest.
            FromString,
            response_serializer=query__pb2.MessageAckResponse.
            SerializeToString,
        ),
        'SplitQuery':
        grpc.unary_unary_rpc_method_handler(
            servicer.SplitQuery,
            request_deserializer=vtgate__pb2.SplitQueryRequest.FromString,
            response_serializer=vtgate__pb2.SplitQueryResponse.
            SerializeToString,
        ),
        'GetSrvKeyspace':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetSrvKeyspace,
            request_deserializer=vtgate__pb2.GetSrvKeyspaceRequest.FromString,
            response_serializer=vtgate__pb2.GetSrvKeyspaceResponse.
            SerializeToString,
        ),
        'UpdateStream':
        grpc.unary_stream_rpc_method_handler(
            servicer.UpdateStream,
            request_deserializer=vtgate__pb2.UpdateStreamRequest.FromString,
            response_serializer=vtgate__pb2.UpdateStreamResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'vtgateservice.Vitess', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_OpenStorageVolumeServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=api__pb2.SdkVolumeCreateRequest.FromString,
            response_serializer=api__pb2.SdkVolumeCreateResponse.
            SerializeToString,
        ),
        'CreateFromVolumeId':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateFromVolumeId,
            request_deserializer=api__pb2.SdkVolumeCreateFromVolumeIdRequest.
            FromString,
            response_serializer=api__pb2.SdkVolumeCreateFromVolumeIdResponse.
            SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=api__pb2.SdkVolumeDeleteRequest.FromString,
            response_serializer=api__pb2.SdkVolumeDeleteResponse.
            SerializeToString,
        ),
        'Inspect':
        grpc.unary_unary_rpc_method_handler(
            servicer.Inspect,
            request_deserializer=api__pb2.SdkVolumeInspectRequest.FromString,
            response_serializer=api__pb2.SdkVolumeInspectResponse.
            SerializeToString,
        ),
        'Enumerate':
        grpc.unary_unary_rpc_method_handler(
            servicer.Enumerate,
            request_deserializer=api__pb2.SdkVolumeEnumerateRequest.FromString,
            response_serializer=api__pb2.SdkVolumeEnumerateResponse.
            SerializeToString,
        ),
        'SnapshotCreate':
        grpc.unary_unary_rpc_method_handler(
            servicer.SnapshotCreate,
            request_deserializer=api__pb2.SdkVolumeSnapshotCreateRequest.
            FromString,
            response_serializer=api__pb2.SdkVolumeSnapshotCreateResponse.
            SerializeToString,
        ),
        'SnapshotRestore':
        grpc.unary_unary_rpc_method_handler(
            servicer.SnapshotRestore,
            request_deserializer=api__pb2.SdkVolumeSnapshotRestoreRequest.
            FromString,
            response_serializer=api__pb2.SdkVolumeSnapshotRestoreResponse.
            SerializeToString,
        ),
        'SnapshotEnumerate':
        grpc.unary_unary_rpc_method_handler(
            servicer.SnapshotEnumerate,
            request_deserializer=api__pb2.SdkVolumeSnapshotEnumerateRequest.
            FromString,
            response_serializer=api__pb2.SdkVolumeSnapshotEnumerateResponse.
            SerializeToString,
        ),
        'Attach':
        grpc.unary_unary_rpc_method_handler(
            servicer.Attach,
            request_deserializer=api__pb2.SdkVolumeAttachRequest.FromString,
            response_serializer=api__pb2.SdkVolumeAttachResponse.
            SerializeToString,
        ),
        'Detach':
        grpc.unary_unary_rpc_method_handler(
            servicer.Detach,
            request_deserializer=api__pb2.SdkVolumeDetachRequest.FromString,
            response_serializer=api__pb2.SdkVolumeDetachResponse.
            SerializeToString,
        ),
        'Mount':
        grpc.unary_unary_rpc_method_handler(
            servicer.Mount,
            request_deserializer=api__pb2.SdkVolumeMountRequest.FromString,
            response_serializer=api__pb2.SdkVolumeMountResponse.
            SerializeToString,
        ),
        'Unmount':
        grpc.unary_unary_rpc_method_handler(
            servicer.Unmount,
            request_deserializer=api__pb2.SdkVolumeUnmountRequest.FromString,
            response_serializer=api__pb2.SdkVolumeUnmountResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'openstorage.api.OpenStorageVolume', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #46
0
def add_EbsServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'ListEbs':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListEbs,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.ListEbsRequest.
            FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.ListEbsResponse.
            SerializeToString,
        ),
        'GetEbsByUuid':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetEbsByUuid,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.
            GetEbsByUuidRequest.FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.
            GetEbsByUuidResponse.SerializeToString,
        ),
        'GetEbsTotalCnt':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetEbsTotalCnt,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.
            GetEbsTotalCntRequest.FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.
            GetEbsTotalCntResponse.SerializeToString,
        ),
        'CreateEbs':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateEbs,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.CreateEbsRequest.
            FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.CreateEbsResponse.
            SerializeToString,
        ),
        'DeleteEbs':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteEbs,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.DeleteEbsRequest.
            FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.DeleteEbsResponse.
            SerializeToString,
        ),
        'AttachEbs':
        grpc.unary_unary_rpc_method_handler(
            servicer.AttachEbs,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.AttachEbsRequest.
            FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.AttachEbsResponse.
            SerializeToString,
        ),
        'DetachEbs':
        grpc.unary_unary_rpc_method_handler(
            servicer.DetachEbs,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.DetachEbsRequest.
            FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.DetachEbsResponse.
            SerializeToString,
        ),
        'ChangeEbsSize':
        grpc.unary_unary_rpc_method_handler(
            servicer.ChangeEbsSize,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.
            ChangeEbsSizeRequest.FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.
            ChangeEbsSizeResponse.SerializeToString,
        ),
        'ChangeEbsName':
        grpc.unary_unary_rpc_method_handler(
            servicer.ChangeEbsName,
            request_deserializer=compute_dot_v1_dot_ebs__pb2.
            ChangeEbsNameRequest.FromString,
            response_serializer=compute_dot_v1_dot_ebs__pb2.
            ChangeEbsNameResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'didi.cloud.compute.v1.Ebs', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #47
0
def add_SipServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'StartSession':
        grpc.unary_unary_rpc_method_handler(
            servicer.StartSession,
            request_deserializer=ondewo_dot_sip_dot_sip__pb2.
            StartSessionRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'EndSession':
        grpc.unary_unary_rpc_method_handler(
            servicer.EndSession,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'StartCall':
        grpc.unary_unary_rpc_method_handler(
            servicer.StartCall,
            request_deserializer=ondewo_dot_sip_dot_sip__pb2.StartCallRequest.
            FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'EndCall':
        grpc.unary_unary_rpc_method_handler(
            servicer.EndCall,
            request_deserializer=ondewo_dot_sip_dot_sip__pb2.EndCallRequest.
            FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'TransferCall':
        grpc.unary_unary_rpc_method_handler(
            servicer.TransferCall,
            request_deserializer=ondewo_dot_sip_dot_sip__pb2.
            TransferCallRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'RegisterAccount':
        grpc.unary_unary_rpc_method_handler(
            servicer.RegisterAccount,
            request_deserializer=ondewo_dot_sip_dot_sip__pb2.
            RegisterAccountRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'GetSipStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetSipStatus,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=ondewo_dot_sip_dot_sip__pb2.SipStatus.
            SerializeToString,
        ),
        'GetSipStatusHistory':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetSipStatusHistory,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=ondewo_dot_sip_dot_sip__pb2.
            SipStatusHistoryResponse.SerializeToString,
        ),
        'PlayWavFiles':
        grpc.unary_unary_rpc_method_handler(
            servicer.PlayWavFiles,
            request_deserializer=ondewo_dot_sip_dot_sip__pb2.
            PlayWavFilesRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'ondewo.sip.Sip', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_OpenStorageCredentialsServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateForAWS':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateForAWS,
            request_deserializer=api__pb2.SdkCredentialCreateAWSRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialCreateAWSResponse.
            SerializeToString,
        ),
        'CreateForAzure':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateForAzure,
            request_deserializer=api__pb2.SdkCredentialCreateAzureRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialCreateAzureResponse.
            SerializeToString,
        ),
        'CreateForGoogle':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateForGoogle,
            request_deserializer=api__pb2.SdkCredentialCreateGoogleRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialCreateGoogleResponse.
            SerializeToString,
        ),
        'EnumerateForAWS':
        grpc.unary_unary_rpc_method_handler(
            servicer.EnumerateForAWS,
            request_deserializer=api__pb2.SdkCredentialEnumerateAWSRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialEnumerateAWSResponse.
            SerializeToString,
        ),
        'EnumerateForAzure':
        grpc.unary_unary_rpc_method_handler(
            servicer.EnumerateForAzure,
            request_deserializer=api__pb2.SdkCredentialEnumerateAzureRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialEnumerateAzureResponse.
            SerializeToString,
        ),
        'EnumerateForGoogle':
        grpc.unary_unary_rpc_method_handler(
            servicer.EnumerateForGoogle,
            request_deserializer=api__pb2.SdkCredentialEnumerateGoogleRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialEnumerateGoogleResponse.
            SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=api__pb2.SdkCredentialDeleteRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialDeleteResponse.
            SerializeToString,
        ),
        'Validate':
        grpc.unary_unary_rpc_method_handler(
            servicer.Validate,
            request_deserializer=api__pb2.SdkCredentialValidateRequest.
            FromString,
            response_serializer=api__pb2.SdkCredentialValidateResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'openstorage.api.OpenStorageCredentials', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_CasbinServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'NewEnforcer': grpc.unary_unary_rpc_method_handler(
          servicer.NewEnforcer,
          request_deserializer=casbin__pb2.NewEnforcerRequest.FromString,
          response_serializer=casbin__pb2.NewEnforcerReply.SerializeToString,
      ),
      'NewAdapter': grpc.unary_unary_rpc_method_handler(
          servicer.NewAdapter,
          request_deserializer=casbin__pb2.NewAdapterRequest.FromString,
          response_serializer=casbin__pb2.NewAdapterReply.SerializeToString,
      ),
      'Enforce': grpc.unary_unary_rpc_method_handler(
          servicer.Enforce,
          request_deserializer=casbin__pb2.EnforceRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'LoadPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.LoadPolicy,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.EmptyReply.SerializeToString,
      ),
      'SavePolicy': grpc.unary_unary_rpc_method_handler(
          servicer.SavePolicy,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.EmptyReply.SerializeToString,
      ),
      'AddPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.AddPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'AddNamedPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.AddNamedPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemovePolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemovePolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemoveNamedPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveNamedPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemoveFilteredPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveFilteredPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemoveFilteredNamedPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveFilteredNamedPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'GetPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetPolicy,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetNamedPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetNamedPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetFilteredPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetFilteredPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetFilteredNamedPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetFilteredNamedPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'AddGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.AddGroupingPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'AddNamedGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.AddNamedGroupingPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemoveGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveGroupingPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemoveNamedGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveNamedGroupingPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemoveFilteredGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveFilteredGroupingPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'RemoveFilteredNamedGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveFilteredNamedGroupingPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'GetGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetGroupingPolicy,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetNamedGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetNamedGroupingPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetFilteredGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetFilteredGroupingPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetFilteredNamedGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetFilteredNamedGroupingPolicy,
          request_deserializer=casbin__pb2.FilteredPolicyRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetAllSubjects': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllSubjects,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetAllNamedSubjects': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllNamedSubjects,
          request_deserializer=casbin__pb2.SimpleGetRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetAllObjects': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllObjects,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetAllNamedObjects': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllNamedObjects,
          request_deserializer=casbin__pb2.SimpleGetRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetAllActions': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllActions,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetAllNamedActions': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllNamedActions,
          request_deserializer=casbin__pb2.SimpleGetRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetAllRoles': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllRoles,
          request_deserializer=casbin__pb2.EmptyRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetAllNamedRoles': grpc.unary_unary_rpc_method_handler(
          servicer.GetAllNamedRoles,
          request_deserializer=casbin__pb2.SimpleGetRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'HasPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.HasPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'HasNamedPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.HasNamedPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'HasGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.HasGroupingPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'HasNamedGroupingPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.HasNamedGroupingPolicy,
          request_deserializer=casbin__pb2.PolicyRequest.FromString,
          response_serializer=casbin__pb2.BoolReply.SerializeToString,
      ),
      'GetRolesForUser': grpc.unary_unary_rpc_method_handler(
          servicer.GetRolesForUser,
          request_deserializer=casbin__pb2.UserRoleRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetImplicitRolesForUser': grpc.unary_unary_rpc_method_handler(
          servicer.GetImplicitRolesForUser,
          request_deserializer=casbin__pb2.UserRoleRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetUsersForRole': grpc.unary_unary_rpc_method_handler(
          servicer.GetUsersForRole,
          request_deserializer=casbin__pb2.UserRoleRequest.FromString,
          response_serializer=casbin__pb2.ArrayReply.SerializeToString,
      ),
      'GetPermissionsForUser': grpc.unary_unary_rpc_method_handler(
          servicer.GetPermissionsForUser,
          request_deserializer=casbin__pb2.PermissionRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
      'GetImplicitPermissionsForUser': grpc.unary_unary_rpc_method_handler(
          servicer.GetImplicitPermissionsForUser,
          request_deserializer=casbin__pb2.PermissionRequest.FromString,
          response_serializer=casbin__pb2.Array2DReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'proto.Casbin', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_OpenStorageCloudBackupServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=api__pb2.SdkCloudBackupCreateRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupCreateResponse.
            SerializeToString,
        ),
        'Restore':
        grpc.unary_unary_rpc_method_handler(
            servicer.Restore,
            request_deserializer=api__pb2.SdkCloudBackupRestoreRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupRestoreResponse.
            SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=api__pb2.SdkCloudBackupDeleteRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupDeleteResponse.
            SerializeToString,
        ),
        'DeleteAll':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteAll,
            request_deserializer=api__pb2.SdkCloudBackupDeleteAllRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupDeleteAllResponse.
            SerializeToString,
        ),
        'Enumerate':
        grpc.unary_unary_rpc_method_handler(
            servicer.Enumerate,
            request_deserializer=api__pb2.SdkCloudBackupEnumerateRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupEnumerateResponse.
            SerializeToString,
        ),
        'Status':
        grpc.unary_unary_rpc_method_handler(
            servicer.Status,
            request_deserializer=api__pb2.SdkCloudBackupStatusRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupStatusResponse.
            SerializeToString,
        ),
        'Catalog':
        grpc.unary_unary_rpc_method_handler(
            servicer.Catalog,
            request_deserializer=api__pb2.SdkCloudBackupCatalogRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupCatalogResponse.
            SerializeToString,
        ),
        'History':
        grpc.unary_unary_rpc_method_handler(
            servicer.History,
            request_deserializer=api__pb2.SdkCloudBackupHistoryRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupHistoryResponse.
            SerializeToString,
        ),
        'StateChange':
        grpc.unary_unary_rpc_method_handler(
            servicer.StateChange,
            request_deserializer=api__pb2.SdkCloudBackupStateChangeRequest.
            FromString,
            response_serializer=api__pb2.SdkCloudBackupStateChangeResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'openstorage.api.OpenStorageCloudBackup', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_AdminServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateBroadcast':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateBroadcast,
            request_deserializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .CreateBroadcastRequest.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_common_dot_proto_dot_fleetspeak_dot_common__pb2
            .EmptyMessage.SerializeToString,
        ),
        'ListActiveBroadcasts':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListActiveBroadcasts,
            request_deserializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .ListActiveBroadcastsRequest.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .ListActiveBroadcastsResponse.SerializeToString,
        ),
        'ListClients':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListClients,
            request_deserializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .ListClientsRequest.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .ListClientsResponse.SerializeToString,
        ),
        'ListClientContacts':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListClientContacts,
            request_deserializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .ListClientContactsRequest.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .ListClientContactsResponse.SerializeToString,
        ),
        'GetMessageStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetMessageStatus,
            request_deserializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .GetMessageStatusRequest.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .GetMessageStatusResponse.SerializeToString,
        ),
        'InsertMessage':
        grpc.unary_unary_rpc_method_handler(
            servicer.InsertMessage,
            request_deserializer=
            fleetspeak_dot_src_dot_common_dot_proto_dot_fleetspeak_dot_common__pb2
            .Message.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_common_dot_proto_dot_fleetspeak_dot_common__pb2
            .EmptyMessage.SerializeToString,
        ),
        'StoreFile':
        grpc.unary_unary_rpc_method_handler(
            servicer.StoreFile,
            request_deserializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .StoreFileRequest.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_common_dot_proto_dot_fleetspeak_dot_common__pb2
            .EmptyMessage.SerializeToString,
        ),
        'KeepAlive':
        grpc.unary_unary_rpc_method_handler(
            servicer.KeepAlive,
            request_deserializer=
            fleetspeak_dot_src_dot_common_dot_proto_dot_fleetspeak_dot_common__pb2
            .EmptyMessage.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_common_dot_proto_dot_fleetspeak_dot_common__pb2
            .EmptyMessage.SerializeToString,
        ),
        'BlacklistClient':
        grpc.unary_unary_rpc_method_handler(
            servicer.BlacklistClient,
            request_deserializer=
            fleetspeak_dot_src_dot_server_dot_proto_dot_fleetspeak__server_dot_admin__pb2
            .BlacklistClientRequest.FromString,
            response_serializer=
            fleetspeak_dot_src_dot_common_dot_proto_dot_fleetspeak_dot_common__pb2
            .EmptyMessage.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'fleetspeak.server.Admin', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #52
0
def add_StacServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'SearchItems':
        grpc.unary_stream_rpc_method_handler(
            servicer.SearchItems,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacRequest.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.
            SerializeToString,
        ),
        'InsertItems':
        grpc.stream_stream_rpc_method_handler(
            servicer.InsertItems,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacItem.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
        'UpdateItems':
        grpc.stream_stream_rpc_method_handler(
            servicer.UpdateItems,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacItem.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
        'CountItems':
        grpc.unary_unary_rpc_method_handler(
            servicer.CountItems,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacRequest.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
        'DeleteOneItem':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteOneItem,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacItem.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
        'SearchOneItem':
        grpc.unary_unary_rpc_method_handler(
            servicer.SearchOneItem,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacRequest.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.
            SerializeToString,
        ),
        'InsertOneItem':
        grpc.unary_unary_rpc_method_handler(
            servicer.InsertOneItem,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacItem.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
        'UpdateOneItem':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateOneItem,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacItem.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
        'SearchCollections':
        grpc.unary_stream_rpc_method_handler(
            servicer.SearchCollections,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            CollectionRequest.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            Collection.SerializeToString,
        ),
        'InsertOneCollection':
        grpc.unary_unary_rpc_method_handler(
            servicer.InsertOneCollection,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            Collection.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
        'UpdateCollection':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateCollection,
            request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            Collection.FromString,
            response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.
            StacDbResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'epl.protobuf.v1.StacService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_DaprServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'InvokeService':
        grpc.unary_unary_rpc_method_handler(
            servicer.InvokeService,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeServiceRequest.FromString,
            response_serializer=dapr_dot_proto_dot_common_dot_v1_dot_common__pb2
            .InvokeResponse.SerializeToString,
        ),
        'GetState':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetStateRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetStateResponse.SerializeToString,
        ),
        'SaveState':
        grpc.unary_unary_rpc_method_handler(
            servicer.SaveState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .SaveStateRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'DeleteState':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteState,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .DeleteStateRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'PublishEvent':
        grpc.unary_unary_rpc_method_handler(
            servicer.PublishEvent,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .PublishEventRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'InvokeBinding':
        grpc.unary_unary_rpc_method_handler(
            servicer.InvokeBinding,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeBindingRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .InvokeBindingResponse.SerializeToString,
        ),
        'GetSecret':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetSecret,
            request_deserializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetSecretRequest.FromString,
            response_serializer=dapr_dot_proto_dot_runtime_dot_v1_dot_dapr__pb2
            .GetSecretResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'dapr.proto.runtime.v1.Dapr', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #54
0
def add_WorkerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetStatus,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .GetStatusRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .GetStatusResponse.SerializeToString,
        ),
        'CreateWorkerSession':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateWorkerSession,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CreateWorkerSessionRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CreateWorkerSessionResponse.SerializeToString,
        ),
        'DeleteWorkerSession':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteWorkerSession,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .DeleteWorkerSessionRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .DeleteWorkerSessionResponse.SerializeToString,
        ),
        'RegisterGraph':
        grpc.unary_unary_rpc_method_handler(
            servicer.RegisterGraph,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RegisterGraphRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RegisterGraphResponse.SerializeToString,
        ),
        'DeregisterGraph':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeregisterGraph,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .DeregisterGraphRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .DeregisterGraphResponse.SerializeToString,
        ),
        'RunGraph':
        grpc.unary_unary_rpc_method_handler(
            servicer.RunGraph,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RunGraphRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RunGraphResponse.SerializeToString,
        ),
        'CleanupGraph':
        grpc.unary_unary_rpc_method_handler(
            servicer.CleanupGraph,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CleanupGraphRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CleanupGraphResponse.SerializeToString,
        ),
        'CleanupAll':
        grpc.unary_unary_rpc_method_handler(
            servicer.CleanupAll,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CleanupAllRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CleanupAllResponse.SerializeToString,
        ),
        'RecvTensor':
        grpc.unary_unary_rpc_method_handler(
            servicer.RecvTensor,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RecvTensorRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RecvTensorResponse.SerializeToString,
        ),
        'Logging':
        grpc.unary_unary_rpc_method_handler(
            servicer.Logging,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .LoggingRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .LoggingResponse.SerializeToString,
        ),
        'Tracing':
        grpc.unary_unary_rpc_method_handler(
            servicer.Tracing,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .TracingRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .TracingResponse.SerializeToString,
        ),
        'RecvBuf':
        grpc.unary_unary_rpc_method_handler(
            servicer.RecvBuf,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RecvBufRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .RecvBufResponse.SerializeToString,
        ),
        'GetStepSequence':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetStepSequence,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .GetStepSequenceRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .GetStepSequenceResponse.SerializeToString,
        ),
        'CompleteGroup':
        grpc.unary_unary_rpc_method_handler(
            servicer.CompleteGroup,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CompleteGroupRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CompleteGroupResponse.SerializeToString,
        ),
        'CompleteInstance':
        grpc.unary_unary_rpc_method_handler(
            servicer.CompleteInstance,
            request_deserializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CompleteInstanceRequest.FromString,
            response_serializer=tensorflow_dot_core_dot_protobuf_dot_worker__pb2
            .CompleteInstanceResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'tensorflow.grpc.WorkerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #55
0
def add_EntityTypesServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'ListEntityTypes':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListEntityTypes,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .ListEntityTypesRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .ListEntityTypesResponse.SerializeToString,
        ),
        'GetEntityType':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetEntityType,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .GetEntityTypeRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .EntityType.SerializeToString,
        ),
        'CreateEntityType':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateEntityType,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .CreateEntityTypeRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .EntityType.SerializeToString,
        ),
        'UpdateEntityType':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateEntityType,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .UpdateEntityTypeRequest.FromString,
            response_serializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .EntityType.SerializeToString,
        ),
        'DeleteEntityType':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteEntityType,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .DeleteEntityTypeRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'BatchUpdateEntityTypes':
        grpc.unary_unary_rpc_method_handler(
            servicer.BatchUpdateEntityTypes,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .BatchUpdateEntityTypesRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.
            Operation.SerializeToString,
        ),
        'BatchDeleteEntityTypes':
        grpc.unary_unary_rpc_method_handler(
            servicer.BatchDeleteEntityTypes,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .BatchDeleteEntityTypesRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.
            Operation.SerializeToString,
        ),
        'BatchCreateEntities':
        grpc.unary_unary_rpc_method_handler(
            servicer.BatchCreateEntities,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .BatchCreateEntitiesRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.
            Operation.SerializeToString,
        ),
        'BatchUpdateEntities':
        grpc.unary_unary_rpc_method_handler(
            servicer.BatchUpdateEntities,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .BatchUpdateEntitiesRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.
            Operation.SerializeToString,
        ),
        'BatchDeleteEntities':
        grpc.unary_unary_rpc_method_handler(
            servicer.BatchDeleteEntities,
            request_deserializer=
            google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2
            .BatchDeleteEntitiesRequest.FromString,
            response_serializer=google_dot_longrunning_dot_operations__pb2.
            Operation.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'google.cloud.dialogflow.v2beta1.EntityTypes', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_CoreServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SearchSolutions': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchSolutions,
                    request_deserializer=core__pb2.SearchSolutionsRequest.FromString,
                    response_serializer=core__pb2.SearchSolutionsResponse.SerializeToString,
            ),
            'GetSearchSolutionsResults': grpc.unary_stream_rpc_method_handler(
                    servicer.GetSearchSolutionsResults,
                    request_deserializer=core__pb2.GetSearchSolutionsResultsRequest.FromString,
                    response_serializer=core__pb2.GetSearchSolutionsResultsResponse.SerializeToString,
            ),
            'EndSearchSolutions': grpc.unary_unary_rpc_method_handler(
                    servicer.EndSearchSolutions,
                    request_deserializer=core__pb2.EndSearchSolutionsRequest.FromString,
                    response_serializer=core__pb2.EndSearchSolutionsResponse.SerializeToString,
            ),
            'StopSearchSolutions': grpc.unary_unary_rpc_method_handler(
                    servicer.StopSearchSolutions,
                    request_deserializer=core__pb2.StopSearchSolutionsRequest.FromString,
                    response_serializer=core__pb2.StopSearchSolutionsResponse.SerializeToString,
            ),
            'DescribeSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.DescribeSolution,
                    request_deserializer=core__pb2.DescribeSolutionRequest.FromString,
                    response_serializer=core__pb2.DescribeSolutionResponse.SerializeToString,
            ),
            'ScoreSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.ScoreSolution,
                    request_deserializer=core__pb2.ScoreSolutionRequest.FromString,
                    response_serializer=core__pb2.ScoreSolutionResponse.SerializeToString,
            ),
            'GetScoreSolutionResults': grpc.unary_stream_rpc_method_handler(
                    servicer.GetScoreSolutionResults,
                    request_deserializer=core__pb2.GetScoreSolutionResultsRequest.FromString,
                    response_serializer=core__pb2.GetScoreSolutionResultsResponse.SerializeToString,
            ),
            'FitSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.FitSolution,
                    request_deserializer=core__pb2.FitSolutionRequest.FromString,
                    response_serializer=core__pb2.FitSolutionResponse.SerializeToString,
            ),
            'GetFitSolutionResults': grpc.unary_stream_rpc_method_handler(
                    servicer.GetFitSolutionResults,
                    request_deserializer=core__pb2.GetFitSolutionResultsRequest.FromString,
                    response_serializer=core__pb2.GetFitSolutionResultsResponse.SerializeToString,
            ),
            'ProduceSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.ProduceSolution,
                    request_deserializer=core__pb2.ProduceSolutionRequest.FromString,
                    response_serializer=core__pb2.ProduceSolutionResponse.SerializeToString,
            ),
            'GetProduceSolutionResults': grpc.unary_stream_rpc_method_handler(
                    servicer.GetProduceSolutionResults,
                    request_deserializer=core__pb2.GetProduceSolutionResultsRequest.FromString,
                    response_serializer=core__pb2.GetProduceSolutionResultsResponse.SerializeToString,
            ),
            'SolutionExport': grpc.unary_unary_rpc_method_handler(
                    servicer.SolutionExport,
                    request_deserializer=core__pb2.SolutionExportRequest.FromString,
                    response_serializer=core__pb2.SolutionExportResponse.SerializeToString,
            ),
            'DataAvailable': grpc.unary_unary_rpc_method_handler(
                    servicer.DataAvailable,
                    request_deserializer=core__pb2.DataAvailableRequest.FromString,
                    response_serializer=core__pb2.DataAvailableResponse.SerializeToString,
            ),
            'ListPrimitives': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPrimitives,
                    request_deserializer=core__pb2.ListPrimitivesRequest.FromString,
                    response_serializer=core__pb2.ListPrimitivesResponse.SerializeToString,
            ),
            'Hello': grpc.unary_unary_rpc_method_handler(
                    servicer.Hello,
                    request_deserializer=core__pb2.HelloRequest.FromString,
                    response_serializer=core__pb2.HelloResponse.SerializeToString,
            ),
            'SaveSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.SaveSolution,
                    request_deserializer=core__pb2.SaveSolutionRequest.FromString,
                    response_serializer=core__pb2.SaveSolutionResponse.SerializeToString,
            ),
            'LoadSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadSolution,
                    request_deserializer=core__pb2.LoadSolutionRequest.FromString,
                    response_serializer=core__pb2.LoadSolutionResponse.SerializeToString,
            ),
            'SaveFittedSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.SaveFittedSolution,
                    request_deserializer=core__pb2.SaveFittedSolutionRequest.FromString,
                    response_serializer=core__pb2.SaveFittedSolutionResponse.SerializeToString,
            ),
            'LoadFittedSolution': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadFittedSolution,
                    request_deserializer=core__pb2.LoadFittedSolutionRequest.FromString,
                    response_serializer=core__pb2.LoadFittedSolutionResponse.SerializeToString,
            ),
            'SplitData': grpc.unary_stream_rpc_method_handler(
                    servicer.SplitData,
                    request_deserializer=core__pb2.SplitDataRequest.FromString,
                    response_serializer=core__pb2.SplitDataResponse.SerializeToString,
            ),
            'ScorePredictions': grpc.unary_unary_rpc_method_handler(
                    servicer.ScorePredictions,
                    request_deserializer=core__pb2.ScorePredictionsRequest.FromString,
                    response_serializer=core__pb2.ScorePredictionsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Core', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Exemple #57
0
def add_NodeManagerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'RequestResourceReport':
        grpc.unary_unary_rpc_method_handler(
            servicer.RequestResourceReport,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RequestResourceReportRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RequestResourceReportReply.SerializeToString,
        ),
        'RequestWorkerLease':
        grpc.unary_unary_rpc_method_handler(
            servicer.RequestWorkerLease,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RequestWorkerLeaseRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RequestWorkerLeaseReply.SerializeToString,
        ),
        'ReturnWorker':
        grpc.unary_unary_rpc_method_handler(
            servicer.ReturnWorker,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .ReturnWorkerRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .ReturnWorkerReply.SerializeToString,
        ),
        'ReleaseUnusedWorkers':
        grpc.unary_unary_rpc_method_handler(
            servicer.ReleaseUnusedWorkers,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .ReleaseUnusedWorkersRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .ReleaseUnusedWorkersReply.SerializeToString,
        ),
        'PrepareBundleResources':
        grpc.unary_unary_rpc_method_handler(
            servicer.PrepareBundleResources,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .PrepareBundleResourcesRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .PrepareBundleResourcesReply.SerializeToString,
        ),
        'CommitBundleResources':
        grpc.unary_unary_rpc_method_handler(
            servicer.CommitBundleResources,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .CommitBundleResourcesRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .CommitBundleResourcesReply.SerializeToString,
        ),
        'CancelResourceReserve':
        grpc.unary_unary_rpc_method_handler(
            servicer.CancelResourceReserve,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .CancelResourceReserveRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .CancelResourceReserveReply.SerializeToString,
        ),
        'CancelWorkerLease':
        grpc.unary_unary_rpc_method_handler(
            servicer.CancelWorkerLease,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .CancelWorkerLeaseRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .CancelWorkerLeaseReply.SerializeToString,
        ),
        'PinObjectIDs':
        grpc.unary_unary_rpc_method_handler(
            servicer.PinObjectIDs,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .PinObjectIDsRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .PinObjectIDsReply.SerializeToString,
        ),
        'GetNodeStats':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetNodeStats,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .GetNodeStatsRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .GetNodeStatsReply.SerializeToString,
        ),
        'GlobalGC':
        grpc.unary_unary_rpc_method_handler(
            servicer.GlobalGC,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .GlobalGCRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .GlobalGCReply.SerializeToString,
        ),
        'FormatGlobalMemoryInfo':
        grpc.unary_unary_rpc_method_handler(
            servicer.FormatGlobalMemoryInfo,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .FormatGlobalMemoryInfoRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .FormatGlobalMemoryInfoReply.SerializeToString,
        ),
        'RequestObjectSpillage':
        grpc.unary_unary_rpc_method_handler(
            servicer.RequestObjectSpillage,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RequestObjectSpillageRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RequestObjectSpillageReply.SerializeToString,
        ),
        'RestoreSpilledObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.RestoreSpilledObject,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RestoreSpilledObjectRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .RestoreSpilledObjectReply.SerializeToString,
        ),
        'ReleaseUnusedBundles':
        grpc.unary_unary_rpc_method_handler(
            servicer.ReleaseUnusedBundles,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .ReleaseUnusedBundlesRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .ReleaseUnusedBundlesReply.SerializeToString,
        ),
        'GetSystemConfig':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetSystemConfig,
            request_deserializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .GetSystemConfigRequest.FromString,
            response_serializer=src_dot_ray_dot_protobuf_dot_node__manager__pb2
            .GetSystemConfigReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'ray.rpc.NodeManagerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_ManagerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'describe_host':
        grpc.unary_unary_rpc_method_handler(
            servicer.describe_host,
            request_deserializer=minknow__api_dot_manager__pb2.
            DescribeHostRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            DescribeHostResponse.SerializeToString,
        ),
        'flow_cell_positions':
        grpc.unary_stream_rpc_method_handler(
            servicer.flow_cell_positions,
            request_deserializer=minknow__api_dot_manager__pb2.
            FlowCellPositionsRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            FlowCellPositionsResponse.SerializeToString,
        ),
        'watch_flow_cell_positions':
        grpc.unary_stream_rpc_method_handler(
            servicer.watch_flow_cell_positions,
            request_deserializer=minknow__api_dot_manager__pb2.
            WatchFlowCellPositionsRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            WatchFlowCellPositionsResponse.SerializeToString,
        ),
        'reset_position':
        grpc.unary_unary_rpc_method_handler(
            servicer.reset_position,
            request_deserializer=minknow__api_dot_manager__pb2.
            ResetPositionRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            ResetPositionResponse.SerializeToString,
        ),
        'basecaller_api':
        grpc.unary_unary_rpc_method_handler(
            servicer.basecaller_api,
            request_deserializer=minknow__api_dot_manager__pb2.
            BasecallerApiRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            BasecallerApiResponse.SerializeToString,
        ),
        'get_guppy_info':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_guppy_info,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetGuppyInfoRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetGuppyInfoResponse.SerializeToString,
        ),
        'get_version_info':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_version_info,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetVersionInfoRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetVersionInfoResponse.SerializeToString,
        ),
        'list_protocol_output_dir_files':
        grpc.unary_stream_rpc_method_handler(
            servicer.list_protocol_output_dir_files,
            request_deserializer=minknow__api_dot_manager__pb2.
            ListProtocolOutputDirFilesRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            ListProtocolOutputDirFilesResponse.SerializeToString,
        ),
        'create_directory':
        grpc.unary_unary_rpc_method_handler(
            servicer.create_directory,
            request_deserializer=minknow__api_dot_manager__pb2.
            CreateDirectoryRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            CreateDirectoryResponse.SerializeToString,
        ),
        'get_disk_space_info':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_disk_space_info,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetDiskSpaceInfoRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetDiskSpaceInfoResponse.SerializeToString,
        ),
        'stream_disk_space_info':
        grpc.unary_stream_rpc_method_handler(
            servicer.stream_disk_space_info,
            request_deserializer=minknow__api_dot_manager__pb2.
            StreamDiskSpaceInfoRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetDiskSpaceInfoResponse.SerializeToString,
        ),
        'get_barcode_kit_info':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_barcode_kit_info,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetBarcodeKitInfoRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetBarcodeKitInfoResponse.SerializeToString,
        ),
        'get_lamp_kit_info':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_lamp_kit_info,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetLampKitInfoRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetLampKitInfoResponse.SerializeToString,
        ),
        'get_barcode_keys':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_barcode_keys,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetBarcodeKeysRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetBarcodeKeysResponse.SerializeToString,
        ),
        'get_flow_cell_types':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_flow_cell_types,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetFlowCellTypesRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetFlowCellTypesResponse.SerializeToString,
        ),
        'get_sequencing_kits':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_sequencing_kits,
            request_deserializer=minknow__api_dot_manager__pb2.
            GetSequencingKitsRequest.FromString,
            response_serializer=minknow__api_dot_manager__pb2.
            GetSequencingKitsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'minknow_api.manager.ManagerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_CollaboratorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'addOrUpdateProjectCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.addOrUpdateProjectCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.FromString,
            response_serializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.Response.SerializeToString,
        ),
        'removeProjectCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.removeProjectCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            Response.SerializeToString,
        ),
        'getProjectCollaborators':
        grpc.unary_unary_rpc_method_handler(
            servicer.getProjectCollaborators,
            request_deserializer=uac_dot_Collaborator__pb2.GetCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.GetCollaborator.
            Response.SerializeToString,
        ),
        'addOrUpdateDatasetCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.addOrUpdateDatasetCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.FromString,
            response_serializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.Response.SerializeToString,
        ),
        'removeDatasetCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.removeDatasetCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            Response.SerializeToString,
        ),
        'getDatasetCollaborators':
        grpc.unary_unary_rpc_method_handler(
            servicer.getDatasetCollaborators,
            request_deserializer=uac_dot_Collaborator__pb2.GetCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.GetCollaborator.
            Response.SerializeToString,
        ),
        'addOrUpdateRepositoryCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.addOrUpdateRepositoryCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.FromString,
            response_serializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.Response.SerializeToString,
        ),
        'removeRepositoryCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.removeRepositoryCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            Response.SerializeToString,
        ),
        'getRepositoryCollaborators':
        grpc.unary_unary_rpc_method_handler(
            servicer.getRepositoryCollaborators,
            request_deserializer=uac_dot_Collaborator__pb2.GetCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.GetCollaborator.
            Response.SerializeToString,
        ),
        'addOrUpdateEndpointCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.addOrUpdateEndpointCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.FromString,
            response_serializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.Response.SerializeToString,
        ),
        'removeEndpointCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.removeEndpointCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            Response.SerializeToString,
        ),
        'getEndpointCollaborators':
        grpc.unary_unary_rpc_method_handler(
            servicer.getEndpointCollaborators,
            request_deserializer=uac_dot_Collaborator__pb2.GetCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.GetCollaborator.
            Response.SerializeToString,
        ),
        'addOrUpdateRegisteredModelCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.addOrUpdateRegisteredModelCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.FromString,
            response_serializer=uac_dot_Collaborator__pb2.
            AddCollaboratorRequest.Response.SerializeToString,
        ),
        'removeRegisteredModelCollaborator':
        grpc.unary_unary_rpc_method_handler(
            servicer.removeRegisteredModelCollaborator,
            request_deserializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.RemoveCollaborator.
            Response.SerializeToString,
        ),
        'getRegisteredModelCollaborators':
        grpc.unary_unary_rpc_method_handler(
            servicer.getRegisteredModelCollaborators,
            request_deserializer=uac_dot_Collaborator__pb2.GetCollaborator.
            FromString,
            response_serializer=uac_dot_Collaborator__pb2.GetCollaborator.
            Response.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'ai.verta.uac.CollaboratorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #60
0
def add_MilvusServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateCollection': grpc.unary_unary_rpc_method_handler(
            servicer.CreateCollection,
            request_deserializer=milvus__pb2.CollectionSchema.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'HasCollection': grpc.unary_unary_rpc_method_handler(
            servicer.HasCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.BoolReply.SerializeToString,
        ),
        'DescribeCollection': grpc.unary_unary_rpc_method_handler(
            servicer.DescribeCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.CollectionSchema.SerializeToString,
        ),
        'CountCollection': grpc.unary_unary_rpc_method_handler(
            servicer.CountCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.CollectionRowCount.SerializeToString,
        ),
        'ShowCollections': grpc.unary_unary_rpc_method_handler(
            servicer.ShowCollections,
            request_deserializer=milvus__pb2.Command.FromString,
            response_serializer=milvus__pb2.CollectionNameList.SerializeToString,
        ),
        'ShowCollectionInfo': grpc.unary_unary_rpc_method_handler(
            servicer.ShowCollectionInfo,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.CollectionInfo.SerializeToString,
        ),
        'DropCollection': grpc.unary_unary_rpc_method_handler(
            servicer.DropCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'CreateIndex': grpc.unary_unary_rpc_method_handler(
            servicer.CreateIndex,
            request_deserializer=milvus__pb2.IndexParam.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'DescribeIndex': grpc.unary_unary_rpc_method_handler(
            servicer.DescribeIndex,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.IndexParam.SerializeToString,
        ),
        'DropIndex': grpc.unary_unary_rpc_method_handler(
            servicer.DropIndex,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'CreatePartition': grpc.unary_unary_rpc_method_handler(
            servicer.CreatePartition,
            request_deserializer=milvus__pb2.PartitionParam.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'HasPartition': grpc.unary_unary_rpc_method_handler(
            servicer.HasPartition,
            request_deserializer=milvus__pb2.PartitionParam.FromString,
            response_serializer=milvus__pb2.BoolReply.SerializeToString,
        ),
        'ShowPartitions': grpc.unary_unary_rpc_method_handler(
            servicer.ShowPartitions,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.PartitionList.SerializeToString,
        ),
        'DropPartition': grpc.unary_unary_rpc_method_handler(
            servicer.DropPartition,
            request_deserializer=milvus__pb2.PartitionParam.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'Insert': grpc.unary_unary_rpc_method_handler(
            servicer.Insert,
            request_deserializer=milvus__pb2.InsertParam.FromString,
            response_serializer=milvus__pb2.VectorIds.SerializeToString,
        ),
        'GetVectorsByID': grpc.unary_unary_rpc_method_handler(
            servicer.GetVectorsByID,
            request_deserializer=milvus__pb2.VectorsIdentity.FromString,
            response_serializer=milvus__pb2.VectorsData.SerializeToString,
        ),
        'GetVectorIDs': grpc.unary_unary_rpc_method_handler(
            servicer.GetVectorIDs,
            request_deserializer=milvus__pb2.GetVectorIDsParam.FromString,
            response_serializer=milvus__pb2.VectorIds.SerializeToString,
        ),
        'Search': grpc.unary_unary_rpc_method_handler(
            servicer.Search,
            request_deserializer=milvus__pb2.SearchParam.FromString,
            response_serializer=milvus__pb2.TopKQueryResult.SerializeToString,
        ),
        'SearchByID': grpc.unary_unary_rpc_method_handler(
            servicer.SearchByID,
            request_deserializer=milvus__pb2.SearchByIDParam.FromString,
            response_serializer=milvus__pb2.TopKQueryResult.SerializeToString,
        ),
        'SearchInFiles': grpc.unary_unary_rpc_method_handler(
            servicer.SearchInFiles,
            request_deserializer=milvus__pb2.SearchInFilesParam.FromString,
            response_serializer=milvus__pb2.TopKQueryResult.SerializeToString,
        ),
        'Cmd': grpc.unary_unary_rpc_method_handler(
            servicer.Cmd,
            request_deserializer=milvus__pb2.Command.FromString,
            response_serializer=milvus__pb2.StringReply.SerializeToString,
        ),
        'DeleteByID': grpc.unary_unary_rpc_method_handler(
            servicer.DeleteByID,
            request_deserializer=milvus__pb2.DeleteByIDParam.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'PreloadCollection': grpc.unary_unary_rpc_method_handler(
            servicer.PreloadCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'ReloadSegments': grpc.unary_unary_rpc_method_handler(
            servicer.ReloadSegments,
            request_deserializer=milvus__pb2.ReLoadSegmentsParam.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'Flush': grpc.unary_unary_rpc_method_handler(
            servicer.Flush,
            request_deserializer=milvus__pb2.FlushParam.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'Compact': grpc.unary_unary_rpc_method_handler(
            servicer.Compact,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'CreateHybridCollection': grpc.unary_unary_rpc_method_handler(
            servicer.CreateHybridCollection,
            request_deserializer=milvus__pb2.Mapping.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'HasHybridCollection': grpc.unary_unary_rpc_method_handler(
            servicer.HasHybridCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.BoolReply.SerializeToString,
        ),
        'DropHybridCollection': grpc.unary_unary_rpc_method_handler(
            servicer.DropHybridCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'DescribeHybridCollection': grpc.unary_unary_rpc_method_handler(
            servicer.DescribeHybridCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.Mapping.SerializeToString,
        ),
        'CountHybridCollection': grpc.unary_unary_rpc_method_handler(
            servicer.CountHybridCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.CollectionRowCount.SerializeToString,
        ),
        'ShowHybridCollections': grpc.unary_unary_rpc_method_handler(
            servicer.ShowHybridCollections,
            request_deserializer=milvus__pb2.Command.FromString,
            response_serializer=milvus__pb2.MappingList.SerializeToString,
        ),
        'ShowHybridCollectionInfo': grpc.unary_unary_rpc_method_handler(
            servicer.ShowHybridCollectionInfo,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=milvus__pb2.CollectionInfo.SerializeToString,
        ),
        'PreloadHybridCollection': grpc.unary_unary_rpc_method_handler(
            servicer.PreloadHybridCollection,
            request_deserializer=milvus__pb2.CollectionName.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
        'InsertEntity': grpc.unary_unary_rpc_method_handler(
            servicer.InsertEntity,
            request_deserializer=milvus__pb2.HInsertParam.FromString,
            response_serializer=milvus__pb2.HEntityIDs.SerializeToString,
        ),
        'HybridSearchPB': grpc.unary_unary_rpc_method_handler(
            servicer.HybridSearchPB,
            request_deserializer=milvus__pb2.HSearchParamPB.FromString,
            response_serializer=milvus__pb2.HQueryResult.SerializeToString,
        ),
        'HybridSearch': grpc.unary_unary_rpc_method_handler(
            servicer.HybridSearch,
            request_deserializer=milvus__pb2.HSearchParam.FromString,
            response_serializer=milvus__pb2.HQueryResult.SerializeToString,
        ),
        'HybridSearchInSegments': grpc.unary_unary_rpc_method_handler(
            servicer.HybridSearchInSegments,
            request_deserializer=milvus__pb2.HSearchInSegmentsParam.FromString,
            response_serializer=milvus__pb2.TopKQueryResult.SerializeToString,
        ),
        'GetEntityByID': grpc.unary_unary_rpc_method_handler(
            servicer.GetEntityByID,
            request_deserializer=milvus__pb2.VectorsIdentity.FromString,
            response_serializer=milvus__pb2.HEntity.SerializeToString,
        ),
        'GetEntityIDs': grpc.unary_unary_rpc_method_handler(
            servicer.GetEntityIDs,
            request_deserializer=milvus__pb2.HGetEntityIDsParam.FromString,
            response_serializer=milvus__pb2.HEntityIDs.SerializeToString,
        ),
        'DeleteEntitiesByID': grpc.unary_unary_rpc_method_handler(
            servicer.DeleteEntitiesByID,
            request_deserializer=milvus__pb2.HDeleteByIDParam.FromString,
            response_serializer=status__pb2.Status.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'milvus.grpc.MilvusService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))