Пример #1
0
def early_adopter_create_UpdateStream_stub(host, port):
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    method_invocation_descriptions = {
        "StreamKeyRange":
        utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamKeyRangeRequest.SerializeToString,
            binlogdata_pb2.StreamKeyRangeResponse.FromString,
        ),
        "StreamTables":
        utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamTablesRequest.SerializeToString,
            binlogdata_pb2.StreamTablesResponse.FromString,
        ),
        "StreamUpdate":
        utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamUpdateRequest.SerializeToString,
            binlogdata_pb2.StreamUpdateResponse.FromString,
        ),
    }
    return implementations.insecure_stub("binlogservice.UpdateStream",
                                         method_invocation_descriptions, host,
                                         port)
def early_adopter_create_BigtableService_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import google.protobuf.empty_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_data_pb2
  method_invocation_descriptions = {
    "CheckAndMutateRow": alpha_utilities.unary_unary_invocation_description(
      gcloud.bigtable._generated.bigtable_service_messages_pb2.CheckAndMutateRowRequest.SerializeToString,
      gcloud.bigtable._generated.bigtable_service_messages_pb2.CheckAndMutateRowResponse.FromString,
    ),
    "MutateRow": alpha_utilities.unary_unary_invocation_description(
      gcloud.bigtable._generated.bigtable_service_messages_pb2.MutateRowRequest.SerializeToString,
      google.protobuf.empty_pb2.Empty.FromString,
    ),
    "ReadModifyWriteRow": alpha_utilities.unary_unary_invocation_description(
      gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadModifyWriteRowRequest.SerializeToString,
      gcloud.bigtable._generated.bigtable_data_pb2.Row.FromString,
    ),
    "ReadRows": alpha_utilities.unary_stream_invocation_description(
      gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadRowsRequest.SerializeToString,
      gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadRowsResponse.FromString,
    ),
    "SampleRowKeys": alpha_utilities.unary_stream_invocation_description(
      gcloud.bigtable._generated.bigtable_service_messages_pb2.SampleRowKeysRequest.SerializeToString,
      gcloud.bigtable._generated.bigtable_service_messages_pb2.SampleRowKeysResponse.FromString,
    ),
  }
  return early_adopter_implementations.stub("google.bigtable.v1.BigtableService", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #3
0
def early_adopter_create_Query_stub(host, port):
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  method_invocation_descriptions = {
    "Begin": utilities.unary_unary_invocation_description(
      query_pb2.BeginRequest.SerializeToString,
      query_pb2.BeginResponse.FromString,
    ),
    "Commit": utilities.unary_unary_invocation_description(
      query_pb2.CommitRequest.SerializeToString,
      query_pb2.CommitResponse.FromString,
    ),
    "Execute": utilities.unary_unary_invocation_description(
      query_pb2.ExecuteRequest.SerializeToString,
      query_pb2.ExecuteResponse.FromString,
    ),
    "ExecuteBatch": utilities.unary_unary_invocation_description(
      query_pb2.ExecuteBatchRequest.SerializeToString,
      query_pb2.ExecuteBatchResponse.FromString,
    ),
    "GetSessionId": utilities.unary_unary_invocation_description(
      query_pb2.GetSessionIdRequest.SerializeToString,
      query_pb2.GetSessionIdResponse.FromString,
    ),
    "Rollback": utilities.unary_unary_invocation_description(
      query_pb2.RollbackRequest.SerializeToString,
      query_pb2.RollbackResponse.FromString,
    ),
    "SplitQuery": utilities.unary_unary_invocation_description(
      query_pb2.SplitQueryRequest.SerializeToString,
      query_pb2.SplitQueryResponse.FromString,
    ),
    "StreamExecute": utilities.unary_stream_invocation_description(
      query_pb2.StreamExecuteRequest.SerializeToString,
      query_pb2.StreamExecuteResponse.FromString,
    ),
    "StreamHealth": utilities.unary_stream_invocation_description(
      query_pb2.StreamHealthRequest.SerializeToString,
      query_pb2.StreamHealthResponse.FromString,
    ),
  }
  return implementations.insecure_stub("queryservice.Query", method_invocation_descriptions, host, port)
Пример #4
0
def early_adopter_create_Query_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  import query_pb2
  method_invocation_descriptions = {
    "Begin": alpha_utilities.unary_unary_invocation_description(
      query_pb2.BeginRequest.SerializeToString,
      query_pb2.BeginResponse.FromString,
    ),
    "Commit": alpha_utilities.unary_unary_invocation_description(
      query_pb2.CommitRequest.SerializeToString,
      query_pb2.CommitResponse.FromString,
    ),
    "Execute": alpha_utilities.unary_unary_invocation_description(
      query_pb2.ExecuteRequest.SerializeToString,
      query_pb2.ExecuteResponse.FromString,
    ),
    "ExecuteBatch": alpha_utilities.unary_unary_invocation_description(
      query_pb2.ExecuteBatchRequest.SerializeToString,
      query_pb2.ExecuteBatchResponse.FromString,
    ),
    "GetSessionId": alpha_utilities.unary_unary_invocation_description(
      query_pb2.GetSessionIdRequest.SerializeToString,
      query_pb2.GetSessionIdResponse.FromString,
    ),
    "Rollback": alpha_utilities.unary_unary_invocation_description(
      query_pb2.RollbackRequest.SerializeToString,
      query_pb2.RollbackResponse.FromString,
    ),
    "SplitQuery": alpha_utilities.unary_unary_invocation_description(
      query_pb2.SplitQueryRequest.SerializeToString,
      query_pb2.SplitQueryResponse.FromString,
    ),
    "StreamExecute": alpha_utilities.unary_stream_invocation_description(
      query_pb2.StreamExecuteRequest.SerializeToString,
      query_pb2.StreamExecuteResponse.FromString,
    ),
    "StreamHealth": alpha_utilities.unary_stream_invocation_description(
      query_pb2.StreamHealthRequest.SerializeToString,
      query_pb2.StreamHealthResponse.FromString,
    ),
  }
  return early_adopter_implementations.stub("queryservice.Query", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #5
0
def early_adopter_create_JobsService_stub(host,
                                          port,
                                          metadata_transformer=None,
                                          secure=False,
                                          root_certificates=None,
                                          private_key=None,
                                          certificate_chain=None,
                                          server_host_override=None):
    import jobs_pb2
    method_invocation_descriptions = {
        "GetCount":
        alpha_utilities.unary_unary_invocation_description(
            jobs_pb2.Void.SerializeToString,
            jobs_pb2.Int.FromString,
        ),
        "GetJobs":
        alpha_utilities.unary_stream_invocation_description(
            jobs_pb2.SearchOptions.SerializeToString,
            jobs_pb2.JobInfo.FromString,
        ),
    }
    return early_adopter_implementations.stub(
        "jobs.JobsService",
        method_invocation_descriptions,
        host,
        port,
        metadata_transformer=metadata_transformer,
        secure=secure,
        root_certificates=root_certificates,
        private_key=private_key,
        certificate_chain=certificate_chain,
        server_host_override=server_host_override)
Пример #6
0
def early_adopter_create_Vtworker_stub(host,
                                       port,
                                       metadata_transformer=None,
                                       secure=False,
                                       root_certificates=None,
                                       private_key=None,
                                       certificate_chain=None,
                                       server_host_override=None):
    import vtworkerdata_pb2
    import vtworkerdata_pb2
    method_invocation_descriptions = {
        "ExecuteVtworkerCommand":
        utilities.unary_stream_invocation_description(
            vtworkerdata_pb2.ExecuteVtworkerCommandRequest.SerializeToString,
            vtworkerdata_pb2.ExecuteVtworkerCommandResponse.FromString,
        ),
    }
    return implementations.stub("vtworkerservice.Vtworker",
                                method_invocation_descriptions,
                                host,
                                port,
                                metadata_transformer=metadata_transformer,
                                secure=secure,
                                root_certificates=root_certificates,
                                private_key=private_key,
                                certificate_chain=certificate_chain,
                                server_host_override=server_host_override)
Пример #7
0
def early_adopter_create_RouteGuide_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  method_invocation_descriptions = {
    "GetFeature": alpha_utilities.unary_unary_invocation_description(
      route_guide_pb2.Point.SerializeToString,
      route_guide_pb2.Feature.FromString,
    ),
    "ListFeatures": alpha_utilities.unary_stream_invocation_description(
      route_guide_pb2.Rectangle.SerializeToString,
      route_guide_pb2.Feature.FromString,
    ),
    "RecordRoute": alpha_utilities.stream_unary_invocation_description(
      route_guide_pb2.Point.SerializeToString,
      route_guide_pb2.RouteSummary.FromString,
    ),
    "RouteChat": alpha_utilities.stream_stream_invocation_description(
      route_guide_pb2.RouteNote.SerializeToString,
      route_guide_pb2.RouteNote.FromString,
    ),
  }
  return early_adopter_implementations.stub("routeguide.RouteGuide", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #8
0
def early_adopter_create_Vtctl_stub(
    host,
    port,
    metadata_transformer=None,
    secure=False,
    root_certificates=None,
    private_key=None,
    certificate_chain=None,
    server_host_override=None,
):
    import vtctldata_pb2
    import vtctldata_pb2

    method_invocation_descriptions = {
        "ExecuteVtctlCommand": alpha_utilities.unary_stream_invocation_description(
            vtctldata_pb2.ExecuteVtctlCommandRequest.SerializeToString,
            vtctldata_pb2.ExecuteVtctlCommandResponse.FromString,
        )
    }
    return early_adopter_implementations.stub(
        "vtctlservice.Vtctl",
        method_invocation_descriptions,
        host,
        port,
        metadata_transformer=metadata_transformer,
        secure=secure,
        root_certificates=root_certificates,
        private_key=private_key,
        certificate_chain=certificate_chain,
        server_host_override=server_host_override,
    )
Пример #9
0
def early_adopter_create_Vtctl_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import vtctl_pb2
  import vtctl_pb2
  method_invocation_descriptions = {
    "ExecuteVtctlCommand": utilities.unary_stream_invocation_description(
      vtctl_pb2.ExecuteVtctlCommandArgs.SerializeToString,
      vtctl_pb2.LoggerEvent.FromString,
    ),
  }
  return implementations.stub("vtctl.Vtctl", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #10
0
def early_adopter_create_Vtworker_stub(host, port):
  import vtworkerdata_pb2
  import vtworkerdata_pb2
  method_invocation_descriptions = {
    "ExecuteVtworkerCommand": utilities.unary_stream_invocation_description(
      vtworkerdata_pb2.ExecuteVtworkerCommandRequest.SerializeToString,
      vtworkerdata_pb2.ExecuteVtworkerCommandResponse.FromString,
    ),
  }
  return implementations.insecure_stub("vtworkerservice.Vtworker", method_invocation_descriptions, host, port)
Пример #11
0
def early_adopter_create_UpdateStream_stub(host,
                                           port,
                                           metadata_transformer=None,
                                           secure=False,
                                           root_certificates=None,
                                           private_key=None,
                                           certificate_chain=None,
                                           server_host_override=None):
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    method_invocation_descriptions = {
        "StreamKeyRange":
        alpha_utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamKeyRangeRequest.SerializeToString,
            binlogdata_pb2.StreamKeyRangeResponse.FromString,
        ),
        "StreamTables":
        alpha_utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamTablesRequest.SerializeToString,
            binlogdata_pb2.StreamTablesResponse.FromString,
        ),
        "StreamUpdate":
        alpha_utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamUpdateRequest.SerializeToString,
            binlogdata_pb2.StreamUpdateResponse.FromString,
        ),
    }
    return early_adopter_implementations.stub(
        "binlogservice.UpdateStream",
        method_invocation_descriptions,
        host,
        port,
        metadata_transformer=metadata_transformer,
        secure=secure,
        root_certificates=root_certificates,
        private_key=private_key,
        certificate_chain=certificate_chain,
        server_host_override=server_host_override)
Пример #12
0
def early_adopter_create_UpdateStream_stub(
    host,
    port,
    metadata_transformer=None,
    secure=False,
    root_certificates=None,
    private_key=None,
    certificate_chain=None,
    server_host_override=None,
):
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2

    method_invocation_descriptions = {
        "StreamKeyRange": alpha_utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamKeyRangeRequest.SerializeToString, binlogdata_pb2.StreamKeyRangeResponse.FromString
        ),
        "StreamTables": alpha_utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamTablesRequest.SerializeToString, binlogdata_pb2.StreamTablesResponse.FromString
        ),
        "StreamUpdate": alpha_utilities.unary_stream_invocation_description(
            binlogdata_pb2.StreamUpdateRequest.SerializeToString, binlogdata_pb2.StreamUpdateResponse.FromString
        ),
    }
    return early_adopter_implementations.stub(
        "binlogservice.UpdateStream",
        method_invocation_descriptions,
        host,
        port,
        metadata_transformer=metadata_transformer,
        secure=secure,
        root_certificates=root_certificates,
        private_key=private_key,
        certificate_chain=certificate_chain,
        server_host_override=server_host_override,
    )
Пример #13
0
def early_adopter_create_UpdateStream_stub(host, port):
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  import binlogdata_pb2
  method_invocation_descriptions = {
    "StreamKeyRange": utilities.unary_stream_invocation_description(
      binlogdata_pb2.StreamKeyRangeRequest.SerializeToString,
      binlogdata_pb2.StreamKeyRangeResponse.FromString,
    ),
    "StreamTables": utilities.unary_stream_invocation_description(
      binlogdata_pb2.StreamTablesRequest.SerializeToString,
      binlogdata_pb2.StreamTablesResponse.FromString,
    ),
    "StreamUpdate": utilities.unary_stream_invocation_description(
      binlogdata_pb2.StreamUpdateRequest.SerializeToString,
      binlogdata_pb2.StreamUpdateResponse.FromString,
    ),
  }
  return implementations.insecure_stub("binlogservice.UpdateStream", method_invocation_descriptions, host, port)
Пример #14
0
def early_adopter_create_Vtworker_stub(host, port):
    import vtworkerdata_pb2
    import vtworkerdata_pb2
    method_invocation_descriptions = {
        "ExecuteVtworkerCommand":
        utilities.unary_stream_invocation_description(
            vtworkerdata_pb2.ExecuteVtworkerCommandRequest.SerializeToString,
            vtworkerdata_pb2.ExecuteVtworkerCommandResponse.FromString,
        ),
    }
    return implementations.insecure_stub("vtworkerservice.Vtworker",
                                         method_invocation_descriptions, host,
                                         port)
Пример #15
0
def early_adopter_create_RouteGuide_stub(host,
                                         port,
                                         metadata_transformer=None,
                                         secure=False,
                                         root_certificates=None,
                                         private_key=None,
                                         certificate_chain=None,
                                         server_host_override=None):
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    method_invocation_descriptions = {
        "GetFeature":
        alpha_utilities.unary_unary_invocation_description(
            route_guide_pb2.Point.SerializeToString,
            route_guide_pb2.Feature.FromString,
        ),
        "ListFeatures":
        alpha_utilities.unary_stream_invocation_description(
            route_guide_pb2.Rectangle.SerializeToString,
            route_guide_pb2.Feature.FromString,
        ),
        "RecordRoute":
        alpha_utilities.stream_unary_invocation_description(
            route_guide_pb2.Point.SerializeToString,
            route_guide_pb2.RouteSummary.FromString,
        ),
        "RouteChat":
        alpha_utilities.stream_stream_invocation_description(
            route_guide_pb2.RouteNote.SerializeToString,
            route_guide_pb2.RouteNote.FromString,
        ),
    }
    return early_adopter_implementations.stub(
        "routeguide.RouteGuide",
        method_invocation_descriptions,
        host,
        port,
        metadata_transformer=metadata_transformer,
        secure=secure,
        root_certificates=root_certificates,
        private_key=private_key,
        certificate_chain=certificate_chain,
        server_host_override=server_host_override)
Пример #16
0
def early_adopter_create_JobsService_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None,
                                          private_key=None, certificate_chain=None, server_host_override=None):
    import jobs_pb2
    method_invocation_descriptions = {
        "GetCount": alpha_utilities.unary_unary_invocation_description(
                jobs_pb2.Void.SerializeToString,
                jobs_pb2.Int.FromString,
        ),
        "GetJobs": alpha_utilities.unary_stream_invocation_description(
                jobs_pb2.SearchOptions.SerializeToString,
                jobs_pb2.JobInfo.FromString,
        ),
    }
    return early_adopter_implementations.stub("jobs.JobsService", method_invocation_descriptions, host, port,
                                              metadata_transformer=metadata_transformer, secure=secure,
                                              root_certificates=root_certificates, private_key=private_key,
                                              certificate_chain=certificate_chain,
                                              server_host_override=server_host_override)
Пример #17
0
def early_adopter_create_TestService_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import test.cpp.interop.empty_pb2
  import test.cpp.interop.empty_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  method_invocation_descriptions = {
    "EmptyCall": utilities.unary_unary_invocation_description(
      test.cpp.interop.empty_pb2.Empty.SerializeToString,
      test.cpp.interop.empty_pb2.Empty.FromString,
    ),
    "FullDuplexCall": utilities.stream_stream_invocation_description(
      test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
      test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
    ),
    "HalfDuplexCall": utilities.stream_stream_invocation_description(
      test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
      test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
    ),
    "StreamingInputCall": utilities.stream_unary_invocation_description(
      test.cpp.interop.messages_pb2.StreamingInputCallRequest.SerializeToString,
      test.cpp.interop.messages_pb2.StreamingInputCallResponse.FromString,
    ),
    "StreamingOutputCall": utilities.unary_stream_invocation_description(
      test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
      test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
    ),
    "UnaryCall": utilities.unary_unary_invocation_description(
      test.cpp.interop.messages_pb2.SimpleRequest.SerializeToString,
      test.cpp.interop.messages_pb2.SimpleResponse.FromString,
    ),
  }
  return implementations.stub("grpc.testing.TestService", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #18
0
def early_adopter_create_Deployments_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  method_invocation_descriptions = {
    "GetFlagz": utilities.unary_unary_invocation_description(
      deployments_pb2.FlagzId.SerializeToString,
      deployments_pb2.Flagz.FromString,
    ),
    "ListFlagz": utilities.unary_stream_invocation_description(
      deployments_pb2.DeploymentId.SerializeToString,
      deployments_pb2.Flagz.FromString,
    ),
    "SetFlagzValue": utilities.unary_unary_invocation_description(
      deployments_pb2.Flagz.SerializeToString,
      deployments_pb2.Empty.FromString,
    ),
  }
  return implementations.stub("improbable.v2.deployments.Deployments", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #19
0
    messages_pb2.SimpleRequest.SerializeToString,
    messages_pb2.SimpleResponse.FromString)
_SERVER_UNARY_CALL = utilities.unary_unary_service_description(
    _unary_call, messages_pb2.SimpleRequest.FromString,
    messages_pb2.SimpleResponse.SerializeToString)


def _streaming_output_call(request, unused_context):
  for response_parameters in request.response_parameters:
    yield messages_pb2.StreamingOutputCallResponse(
        payload=messages_pb2.Payload(
            type=request.response_type,
            body=b'\x00' * response_parameters.size))

_CLIENT_STREAMING_OUTPUT_CALL = utilities.unary_stream_invocation_description(
    messages_pb2.StreamingOutputCallRequest.SerializeToString,
    messages_pb2.StreamingOutputCallResponse.FromString)
_SERVER_STREAMING_OUTPUT_CALL = utilities.unary_stream_service_description(
    _streaming_output_call,
    messages_pb2.StreamingOutputCallRequest.FromString,
    messages_pb2.StreamingOutputCallResponse.SerializeToString)


def _streaming_input_call(request_iterator, unused_context):
  aggregate_size = 0
  for request in request_iterator:
    if request.payload and request.payload.body:
      aggregate_size += len(request.payload.body)
  return messages_pb2.StreamingInputCallResponse(
      aggregated_payload_size=aggregate_size)
def early_adopter_create_TabletManager_stub(host, port):
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  method_invocation_descriptions = {
    "ApplySchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ApplySchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.ApplySchemaResponse.FromString,
    ),
    "Backup": utilities.unary_stream_invocation_description(
      tabletmanagerdata_pb2.BackupRequest.SerializeToString,
      tabletmanagerdata_pb2.BackupResponse.FromString,
    ),
    "ChangeType": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ChangeTypeRequest.SerializeToString,
      tabletmanagerdata_pb2.ChangeTypeResponse.FromString,
    ),
    "DemoteMaster": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.DemoteMasterRequest.SerializeToString,
      tabletmanagerdata_pb2.DemoteMasterResponse.FromString,
    ),
    "ExecuteFetchAsApp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ExecuteFetchAsAppRequest.SerializeToString,
      tabletmanagerdata_pb2.ExecuteFetchAsAppResponse.FromString,
    ),
    "ExecuteFetchAsDba": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ExecuteFetchAsDbaRequest.SerializeToString,
      tabletmanagerdata_pb2.ExecuteFetchAsDbaResponse.FromString,
    ),
    "ExecuteHook": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ExecuteHookRequest.SerializeToString,
      tabletmanagerdata_pb2.ExecuteHookResponse.FromString,
    ),
    "GetPermissions": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.GetPermissionsRequest.SerializeToString,
      tabletmanagerdata_pb2.GetPermissionsResponse.FromString,
    ),
    "GetSchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.GetSchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.GetSchemaResponse.FromString,
    ),
    "GetSlaves": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.GetSlavesRequest.SerializeToString,
      tabletmanagerdata_pb2.GetSlavesResponse.FromString,
    ),
    "InitMaster": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.InitMasterRequest.SerializeToString,
      tabletmanagerdata_pb2.InitMasterResponse.FromString,
    ),
    "InitSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.InitSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.InitSlaveResponse.FromString,
    ),
    "MasterPosition": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.MasterPositionRequest.SerializeToString,
      tabletmanagerdata_pb2.MasterPositionResponse.FromString,
    ),
    "Ping": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PingRequest.SerializeToString,
      tabletmanagerdata_pb2.PingResponse.FromString,
    ),
    "PopulateReparentJournal": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PopulateReparentJournalRequest.SerializeToString,
      tabletmanagerdata_pb2.PopulateReparentJournalResponse.FromString,
    ),
    "PreflightSchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PreflightSchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.PreflightSchemaResponse.FromString,
    ),
    "PromoteSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PromoteSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.PromoteSlaveResponse.FromString,
    ),
    "PromoteSlaveWhenCaughtUp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpRequest.SerializeToString,
      tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpResponse.FromString,
    ),
    "RefreshState": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.RefreshStateRequest.SerializeToString,
      tabletmanagerdata_pb2.RefreshStateResponse.FromString,
    ),
    "ReloadSchema": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ReloadSchemaRequest.SerializeToString,
      tabletmanagerdata_pb2.ReloadSchemaResponse.FromString,
    ),
    "ResetReplication": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ResetReplicationRequest.SerializeToString,
      tabletmanagerdata_pb2.ResetReplicationResponse.FromString,
    ),
    "RunBlpUntil": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.RunBlpUntilRequest.SerializeToString,
      tabletmanagerdata_pb2.RunBlpUntilResponse.FromString,
    ),
    "RunHealthCheck": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.RunHealthCheckRequest.SerializeToString,
      tabletmanagerdata_pb2.RunHealthCheckResponse.FromString,
    ),
    "Scrap": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.ScrapRequest.SerializeToString,
      tabletmanagerdata_pb2.ScrapResponse.FromString,
    ),
    "SetMaster": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SetMasterRequest.SerializeToString,
      tabletmanagerdata_pb2.SetMasterResponse.FromString,
    ),
    "SetReadOnly": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SetReadOnlyRequest.SerializeToString,
      tabletmanagerdata_pb2.SetReadOnlyResponse.FromString,
    ),
    "SetReadWrite": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SetReadWriteRequest.SerializeToString,
      tabletmanagerdata_pb2.SetReadWriteResponse.FromString,
    ),
    "SlaveStatus": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SlaveStatusRequest.SerializeToString,
      tabletmanagerdata_pb2.SlaveStatusResponse.FromString,
    ),
    "SlaveWasPromoted": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SlaveWasPromotedRequest.SerializeToString,
      tabletmanagerdata_pb2.SlaveWasPromotedResponse.FromString,
    ),
    "SlaveWasRestarted": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SlaveWasRestartedRequest.SerializeToString,
      tabletmanagerdata_pb2.SlaveWasRestartedResponse.FromString,
    ),
    "Sleep": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.SleepRequest.SerializeToString,
      tabletmanagerdata_pb2.SleepResponse.FromString,
    ),
    "StartBlp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StartBlpRequest.SerializeToString,
      tabletmanagerdata_pb2.StartBlpResponse.FromString,
    ),
    "StartSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StartSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.StartSlaveResponse.FromString,
    ),
    "StopBlp": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopBlpRequest.SerializeToString,
      tabletmanagerdata_pb2.StopBlpResponse.FromString,
    ),
    "StopReplicationAndGetStatus": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopReplicationAndGetStatusRequest.SerializeToString,
      tabletmanagerdata_pb2.StopReplicationAndGetStatusResponse.FromString,
    ),
    "StopSlave": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopSlaveRequest.SerializeToString,
      tabletmanagerdata_pb2.StopSlaveResponse.FromString,
    ),
    "StopSlaveMinimum": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.StopSlaveMinimumRequest.SerializeToString,
      tabletmanagerdata_pb2.StopSlaveMinimumResponse.FromString,
    ),
    "TabletExternallyElected": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.TabletExternallyElectedRequest.SerializeToString,
      tabletmanagerdata_pb2.TabletExternallyElectedResponse.FromString,
    ),
    "TabletExternallyReparented": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.TabletExternallyReparentedRequest.SerializeToString,
      tabletmanagerdata_pb2.TabletExternallyReparentedResponse.FromString,
    ),
    "WaitBlpPosition": utilities.unary_unary_invocation_description(
      tabletmanagerdata_pb2.WaitBlpPositionRequest.SerializeToString,
      tabletmanagerdata_pb2.WaitBlpPositionResponse.FromString,
    ),
  }
  return implementations.insecure_stub("tabletmanagerservice.TabletManager", method_invocation_descriptions, host, port)
Пример #21
0
def early_adopter_create_TestService_stub(host,
                                          port,
                                          metadata_transformer=None,
                                          secure=False,
                                          root_certificates=None,
                                          private_key=None,
                                          certificate_chain=None,
                                          server_host_override=None):
    import test.cpp.interop.empty_pb2
    import test.cpp.interop.empty_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    import test.cpp.interop.messages_pb2
    method_invocation_descriptions = {
        "EmptyCall":
        utilities.unary_unary_invocation_description(
            test.cpp.interop.empty_pb2.Empty.SerializeToString,
            test.cpp.interop.empty_pb2.Empty.FromString,
        ),
        "FullDuplexCall":
        utilities.stream_stream_invocation_description(
            test.cpp.interop.messages_pb2.StreamingOutputCallRequest.
            SerializeToString,
            test.cpp.interop.messages_pb2.StreamingOutputCallResponse.
            FromString,
        ),
        "HalfDuplexCall":
        utilities.stream_stream_invocation_description(
            test.cpp.interop.messages_pb2.StreamingOutputCallRequest.
            SerializeToString,
            test.cpp.interop.messages_pb2.StreamingOutputCallResponse.
            FromString,
        ),
        "StreamingInputCall":
        utilities.stream_unary_invocation_description(
            test.cpp.interop.messages_pb2.StreamingInputCallRequest.
            SerializeToString,
            test.cpp.interop.messages_pb2.StreamingInputCallResponse.
            FromString,
        ),
        "StreamingOutputCall":
        utilities.unary_stream_invocation_description(
            test.cpp.interop.messages_pb2.StreamingOutputCallRequest.
            SerializeToString,
            test.cpp.interop.messages_pb2.StreamingOutputCallResponse.
            FromString,
        ),
        "UnaryCall":
        utilities.unary_unary_invocation_description(
            test.cpp.interop.messages_pb2.SimpleRequest.SerializeToString,
            test.cpp.interop.messages_pb2.SimpleResponse.FromString,
        ),
    }
    return implementations.stub("grpc.testing.TestService",
                                method_invocation_descriptions,
                                host,
                                port,
                                metadata_transformer=metadata_transformer,
                                secure=secure,
                                root_certificates=root_certificates,
                                private_key=private_key,
                                certificate_chain=certificate_chain,
                                server_host_override=server_host_override)
Пример #22
0
def early_adopter_create_TabletManager_stub(host, port):
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    import tabletmanagerdata_pb2
    method_invocation_descriptions = {
        "ApplySchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ApplySchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.ApplySchemaResponse.FromString,
        ),
        "Backup":
        utilities.unary_stream_invocation_description(
            tabletmanagerdata_pb2.BackupRequest.SerializeToString,
            tabletmanagerdata_pb2.BackupResponse.FromString,
        ),
        "ChangeType":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ChangeTypeRequest.SerializeToString,
            tabletmanagerdata_pb2.ChangeTypeResponse.FromString,
        ),
        "DemoteMaster":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.DemoteMasterRequest.SerializeToString,
            tabletmanagerdata_pb2.DemoteMasterResponse.FromString,
        ),
        "ExecuteFetchAsApp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ExecuteFetchAsAppRequest.SerializeToString,
            tabletmanagerdata_pb2.ExecuteFetchAsAppResponse.FromString,
        ),
        "ExecuteFetchAsDba":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ExecuteFetchAsDbaRequest.SerializeToString,
            tabletmanagerdata_pb2.ExecuteFetchAsDbaResponse.FromString,
        ),
        "ExecuteHook":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ExecuteHookRequest.SerializeToString,
            tabletmanagerdata_pb2.ExecuteHookResponse.FromString,
        ),
        "GetPermissions":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.GetPermissionsRequest.SerializeToString,
            tabletmanagerdata_pb2.GetPermissionsResponse.FromString,
        ),
        "GetSchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.GetSchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.GetSchemaResponse.FromString,
        ),
        "GetSlaves":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.GetSlavesRequest.SerializeToString,
            tabletmanagerdata_pb2.GetSlavesResponse.FromString,
        ),
        "InitMaster":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.InitMasterRequest.SerializeToString,
            tabletmanagerdata_pb2.InitMasterResponse.FromString,
        ),
        "InitSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.InitSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.InitSlaveResponse.FromString,
        ),
        "MasterPosition":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.MasterPositionRequest.SerializeToString,
            tabletmanagerdata_pb2.MasterPositionResponse.FromString,
        ),
        "Ping":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PingRequest.SerializeToString,
            tabletmanagerdata_pb2.PingResponse.FromString,
        ),
        "PopulateReparentJournal":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PopulateReparentJournalRequest.
            SerializeToString,
            tabletmanagerdata_pb2.PopulateReparentJournalResponse.FromString,
        ),
        "PreflightSchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PreflightSchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.PreflightSchemaResponse.FromString,
        ),
        "PromoteSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PromoteSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.PromoteSlaveResponse.FromString,
        ),
        "PromoteSlaveWhenCaughtUp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpRequest.
            SerializeToString,
            tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpResponse.FromString,
        ),
        "RefreshState":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.RefreshStateRequest.SerializeToString,
            tabletmanagerdata_pb2.RefreshStateResponse.FromString,
        ),
        "ReloadSchema":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ReloadSchemaRequest.SerializeToString,
            tabletmanagerdata_pb2.ReloadSchemaResponse.FromString,
        ),
        "ResetReplication":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ResetReplicationRequest.SerializeToString,
            tabletmanagerdata_pb2.ResetReplicationResponse.FromString,
        ),
        "RunBlpUntil":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.RunBlpUntilRequest.SerializeToString,
            tabletmanagerdata_pb2.RunBlpUntilResponse.FromString,
        ),
        "RunHealthCheck":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.RunHealthCheckRequest.SerializeToString,
            tabletmanagerdata_pb2.RunHealthCheckResponse.FromString,
        ),
        "Scrap":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.ScrapRequest.SerializeToString,
            tabletmanagerdata_pb2.ScrapResponse.FromString,
        ),
        "SetMaster":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SetMasterRequest.SerializeToString,
            tabletmanagerdata_pb2.SetMasterResponse.FromString,
        ),
        "SetReadOnly":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SetReadOnlyRequest.SerializeToString,
            tabletmanagerdata_pb2.SetReadOnlyResponse.FromString,
        ),
        "SetReadWrite":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SetReadWriteRequest.SerializeToString,
            tabletmanagerdata_pb2.SetReadWriteResponse.FromString,
        ),
        "SlaveStatus":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SlaveStatusRequest.SerializeToString,
            tabletmanagerdata_pb2.SlaveStatusResponse.FromString,
        ),
        "SlaveWasPromoted":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SlaveWasPromotedRequest.SerializeToString,
            tabletmanagerdata_pb2.SlaveWasPromotedResponse.FromString,
        ),
        "SlaveWasRestarted":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SlaveWasRestartedRequest.SerializeToString,
            tabletmanagerdata_pb2.SlaveWasRestartedResponse.FromString,
        ),
        "Sleep":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.SleepRequest.SerializeToString,
            tabletmanagerdata_pb2.SleepResponse.FromString,
        ),
        "StartBlp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StartBlpRequest.SerializeToString,
            tabletmanagerdata_pb2.StartBlpResponse.FromString,
        ),
        "StartSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StartSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.StartSlaveResponse.FromString,
        ),
        "StopBlp":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopBlpRequest.SerializeToString,
            tabletmanagerdata_pb2.StopBlpResponse.FromString,
        ),
        "StopReplicationAndGetStatus":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopReplicationAndGetStatusRequest.
            SerializeToString,
            tabletmanagerdata_pb2.StopReplicationAndGetStatusResponse.
            FromString,
        ),
        "StopSlave":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopSlaveRequest.SerializeToString,
            tabletmanagerdata_pb2.StopSlaveResponse.FromString,
        ),
        "StopSlaveMinimum":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.StopSlaveMinimumRequest.SerializeToString,
            tabletmanagerdata_pb2.StopSlaveMinimumResponse.FromString,
        ),
        "TabletExternallyElected":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.TabletExternallyElectedRequest.
            SerializeToString,
            tabletmanagerdata_pb2.TabletExternallyElectedResponse.FromString,
        ),
        "TabletExternallyReparented":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.TabletExternallyReparentedRequest.
            SerializeToString,
            tabletmanagerdata_pb2.TabletExternallyReparentedResponse.
            FromString,
        ),
        "WaitBlpPosition":
        utilities.unary_unary_invocation_description(
            tabletmanagerdata_pb2.WaitBlpPositionRequest.SerializeToString,
            tabletmanagerdata_pb2.WaitBlpPositionResponse.FromString,
        ),
    }
    return implementations.insecure_stub("tabletmanagerservice.TabletManager",
                                         method_invocation_descriptions, host,
                                         port)
Пример #23
0
def early_adopter_create_Query_stub(host, port):
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    method_invocation_descriptions = {
        "Begin":
        utilities.unary_unary_invocation_description(
            query_pb2.BeginRequest.SerializeToString,
            query_pb2.BeginResponse.FromString,
        ),
        "Commit":
        utilities.unary_unary_invocation_description(
            query_pb2.CommitRequest.SerializeToString,
            query_pb2.CommitResponse.FromString,
        ),
        "Execute":
        utilities.unary_unary_invocation_description(
            query_pb2.ExecuteRequest.SerializeToString,
            query_pb2.ExecuteResponse.FromString,
        ),
        "ExecuteBatch":
        utilities.unary_unary_invocation_description(
            query_pb2.ExecuteBatchRequest.SerializeToString,
            query_pb2.ExecuteBatchResponse.FromString,
        ),
        "GetSessionId":
        utilities.unary_unary_invocation_description(
            query_pb2.GetSessionIdRequest.SerializeToString,
            query_pb2.GetSessionIdResponse.FromString,
        ),
        "Rollback":
        utilities.unary_unary_invocation_description(
            query_pb2.RollbackRequest.SerializeToString,
            query_pb2.RollbackResponse.FromString,
        ),
        "SplitQuery":
        utilities.unary_unary_invocation_description(
            query_pb2.SplitQueryRequest.SerializeToString,
            query_pb2.SplitQueryResponse.FromString,
        ),
        "StreamExecute":
        utilities.unary_stream_invocation_description(
            query_pb2.StreamExecuteRequest.SerializeToString,
            query_pb2.StreamExecuteResponse.FromString,
        ),
        "StreamHealth":
        utilities.unary_stream_invocation_description(
            query_pb2.StreamHealthRequest.SerializeToString,
            query_pb2.StreamHealthResponse.FromString,
        ),
    }
    return implementations.insecure_stub("queryservice.Query",
                                         method_invocation_descriptions, host,
                                         port)
Пример #24
0
    yield math_pb2.Num(num=number)


def _sum(request_iterator, unused_context):
  accumulation = 0
  for request in request_iterator:
    accumulation += request.num
  return math_pb2.Num(num=accumulation)


_INVOCATION_DESCRIPTIONS = {
    DIV: utilities.unary_unary_invocation_description(
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    DIV_MANY: utilities.stream_stream_invocation_description(
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    FIB: utilities.unary_stream_invocation_description(
        math_pb2.FibArgs.SerializeToString, math_pb2.Num.FromString),
    SUM: utilities.stream_unary_invocation_description(
        math_pb2.Num.SerializeToString, math_pb2.Num.FromString),
}

_SERVICE_DESCRIPTIONS = {
    DIV: utilities.unary_unary_service_description(
        _div, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    DIV_MANY: utilities.stream_stream_service_description(
        _div_many, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    FIB: utilities.unary_stream_service_description(
        _fib, math_pb2.FibArgs.FromString, math_pb2.Num.SerializeToString),
    SUM: utilities.stream_unary_service_description(
        _sum, math_pb2.Num.FromString, math_pb2.Num.SerializeToString),
Пример #25
0
def early_adopter_create_Vitess_stub(host, port):
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  method_invocation_descriptions = {
    "Begin": utilities.unary_unary_invocation_description(
      vtgate_pb2.BeginRequest.SerializeToString,
      vtgate_pb2.BeginResponse.FromString,
    ),
    "Commit": utilities.unary_unary_invocation_description(
      vtgate_pb2.CommitRequest.SerializeToString,
      vtgate_pb2.CommitResponse.FromString,
    ),
    "Execute": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteRequest.SerializeToString,
      vtgate_pb2.ExecuteResponse.FromString,
    ),
    "ExecuteBatchKeyspaceIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.FromString,
    ),
    "ExecuteBatchShards": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteBatchShardsRequest.SerializeToString,
      vtgate_pb2.ExecuteBatchShardsResponse.FromString,
    ),
    "ExecuteEntityIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteEntityIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteEntityIdsResponse.FromString,
    ),
    "ExecuteKeyRanges": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteKeyRangesRequest.SerializeToString,
      vtgate_pb2.ExecuteKeyRangesResponse.FromString,
    ),
    "ExecuteKeyspaceIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteKeyspaceIdsResponse.FromString,
    ),
    "ExecuteShards": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteShardsRequest.SerializeToString,
      vtgate_pb2.ExecuteShardsResponse.FromString,
    ),
    "GetSrvKeyspace": utilities.unary_unary_invocation_description(
      vtgate_pb2.GetSrvKeyspaceRequest.SerializeToString,
      vtgate_pb2.GetSrvKeyspaceResponse.FromString,
    ),
    "Rollback": utilities.unary_unary_invocation_description(
      vtgate_pb2.RollbackRequest.SerializeToString,
      vtgate_pb2.RollbackResponse.FromString,
    ),
    "SplitQuery": utilities.unary_unary_invocation_description(
      vtgate_pb2.SplitQueryRequest.SerializeToString,
      vtgate_pb2.SplitQueryResponse.FromString,
    ),
    "StreamExecute": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteRequest.SerializeToString,
      vtgate_pb2.StreamExecuteResponse.FromString,
    ),
    "StreamExecuteKeyRanges": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteKeyRangesRequest.SerializeToString,
      vtgate_pb2.StreamExecuteKeyRangesResponse.FromString,
    ),
    "StreamExecuteKeyspaceIds": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.StreamExecuteKeyspaceIdsResponse.FromString,
    ),
    "StreamExecuteShards": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteShardsRequest.SerializeToString,
      vtgate_pb2.StreamExecuteShardsResponse.FromString,
    ),
  }
  return implementations.insecure_stub("vtgateservice.Vitess", method_invocation_descriptions, host, port)
Пример #26
0
def early_adopter_create_ZfsRpc_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  method_invocation_descriptions = {
    "CreateFile": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.FilePath.SerializeToString,
      zfs_pb2.StdReply.FromString,
    ),
    "Fetch": alpha_utilities.unary_stream_invocation_description(
      zfs_pb2.FilePath.SerializeToString,
      zfs_pb2.FileDataBlock.FromString,
    ),
    "FetchDir": alpha_utilities.unary_stream_invocation_description(
      zfs_pb2.FilePath.SerializeToString,
      zfs_pb2.DirListBlock.FromString,
    ),
    "GetFileStat": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.FilePath.SerializeToString,
      zfs_pb2.FileStat.FromString,
    ),
    "MakeDir": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.FilePath.SerializeToString,
      zfs_pb2.StdReply.FromString,
    ),
    "RemoveDir": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.FilePath.SerializeToString,
      zfs_pb2.StdReply.FromString,
    ),
    "RemoveFile": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.FilePath.SerializeToString,
      zfs_pb2.StdReply.FromString,
    ),
    "Rename": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.RenameMsg.SerializeToString,
      zfs_pb2.StdReply.FromString,
    ),
    "SetFileStat": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.FileStat.SerializeToString,
      zfs_pb2.StdReply.FromString,
    ),
    "Store": alpha_utilities.stream_unary_invocation_description(
      zfs_pb2.FileDataBlock.SerializeToString,
      zfs_pb2.StdReply.FromString,
    ),
    "TestAuth": alpha_utilities.unary_unary_invocation_description(
      zfs_pb2.TestAuthRequest.SerializeToString,
      zfs_pb2.TestAuthReply.FromString,
    ),
  }
  return early_adopter_implementations.stub("zfs.ZfsRpc", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #27
0
def _sum(request_iterator, unused_context):
    accumulation = 0
    for request in request_iterator:
        accumulation += request.num
    return math_pb2.Num(num=accumulation)


_INVOCATION_DESCRIPTIONS = {
    DIV:
    utilities.unary_unary_invocation_description(
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    DIV_MANY:
    utilities.stream_stream_invocation_description(
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    FIB:
    utilities.unary_stream_invocation_description(
        math_pb2.FibArgs.SerializeToString, math_pb2.Num.FromString),
    SUM:
    utilities.stream_unary_invocation_description(
        math_pb2.Num.SerializeToString, math_pb2.Num.FromString),
}

_SERVICE_DESCRIPTIONS = {
    DIV:
    utilities.unary_unary_service_description(
        _div, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    DIV_MANY:
    utilities.stream_stream_service_description(
        _div_many, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    FIB:
Пример #28
0
def early_adopter_create_Vitess_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  method_invocation_descriptions = {
    "Begin": utilities.unary_unary_invocation_description(
      vtgate_pb2.BeginRequest.SerializeToString,
      vtgate_pb2.BeginResponse.FromString,
    ),
    "Commit": utilities.unary_unary_invocation_description(
      vtgate_pb2.CommitRequest.SerializeToString,
      vtgate_pb2.CommitResponse.FromString,
    ),
    "Execute": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteRequest.SerializeToString,
      vtgate_pb2.ExecuteResponse.FromString,
    ),
    "ExecuteBatchKeyspaceIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.FromString,
    ),
    "ExecuteBatchShards": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteBatchShardsRequest.SerializeToString,
      vtgate_pb2.ExecuteBatchShardsResponse.FromString,
    ),
    "ExecuteEntityIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteEntityIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteEntityIdsResponse.FromString,
    ),
    "ExecuteKeyRanges": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteKeyRangesRequest.SerializeToString,
      vtgate_pb2.ExecuteKeyRangesResponse.FromString,
    ),
    "ExecuteKeyspaceIds": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.ExecuteKeyspaceIdsResponse.FromString,
    ),
    "ExecuteShards": utilities.unary_unary_invocation_description(
      vtgate_pb2.ExecuteShardsRequest.SerializeToString,
      vtgate_pb2.ExecuteShardsResponse.FromString,
    ),
    "GetSrvKeyspace": utilities.unary_unary_invocation_description(
      vtgate_pb2.GetSrvKeyspaceRequest.SerializeToString,
      vtgate_pb2.GetSrvKeyspaceResponse.FromString,
    ),
    "Rollback": utilities.unary_unary_invocation_description(
      vtgate_pb2.RollbackRequest.SerializeToString,
      vtgate_pb2.RollbackResponse.FromString,
    ),
    "SplitQuery": utilities.unary_unary_invocation_description(
      vtgate_pb2.SplitQueryRequest.SerializeToString,
      vtgate_pb2.SplitQueryResponse.FromString,
    ),
    "StreamExecute": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteRequest.SerializeToString,
      vtgate_pb2.StreamExecuteResponse.FromString,
    ),
    "StreamExecuteKeyRanges": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteKeyRangesRequest.SerializeToString,
      vtgate_pb2.StreamExecuteKeyRangesResponse.FromString,
    ),
    "StreamExecuteKeyspaceIds": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString,
      vtgate_pb2.StreamExecuteKeyspaceIdsResponse.FromString,
    ),
    "StreamExecuteShards": utilities.unary_stream_invocation_description(
      vtgate_pb2.StreamExecuteShardsRequest.SerializeToString,
      vtgate_pb2.StreamExecuteShardsResponse.FromString,
    ),
  }
  return implementations.stub("vtgateservice.Vitess", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
Пример #29
0
def early_adopter_create_Query_stub(host,
                                    port,
                                    metadata_transformer=None,
                                    secure=False,
                                    root_certificates=None,
                                    private_key=None,
                                    certificate_chain=None,
                                    server_host_override=None):
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    import query_pb2
    method_invocation_descriptions = {
        "Begin":
        alpha_utilities.unary_unary_invocation_description(
            query_pb2.BeginRequest.SerializeToString,
            query_pb2.BeginResponse.FromString,
        ),
        "Commit":
        alpha_utilities.unary_unary_invocation_description(
            query_pb2.CommitRequest.SerializeToString,
            query_pb2.CommitResponse.FromString,
        ),
        "Execute":
        alpha_utilities.unary_unary_invocation_description(
            query_pb2.ExecuteRequest.SerializeToString,
            query_pb2.ExecuteResponse.FromString,
        ),
        "ExecuteBatch":
        alpha_utilities.unary_unary_invocation_description(
            query_pb2.ExecuteBatchRequest.SerializeToString,
            query_pb2.ExecuteBatchResponse.FromString,
        ),
        "GetSessionId":
        alpha_utilities.unary_unary_invocation_description(
            query_pb2.GetSessionIdRequest.SerializeToString,
            query_pb2.GetSessionIdResponse.FromString,
        ),
        "Rollback":
        alpha_utilities.unary_unary_invocation_description(
            query_pb2.RollbackRequest.SerializeToString,
            query_pb2.RollbackResponse.FromString,
        ),
        "SplitQuery":
        alpha_utilities.unary_unary_invocation_description(
            query_pb2.SplitQueryRequest.SerializeToString,
            query_pb2.SplitQueryResponse.FromString,
        ),
        "StreamExecute":
        alpha_utilities.unary_stream_invocation_description(
            query_pb2.StreamExecuteRequest.SerializeToString,
            query_pb2.StreamExecuteResponse.FromString,
        ),
        "StreamHealth":
        alpha_utilities.unary_stream_invocation_description(
            query_pb2.StreamHealthRequest.SerializeToString,
            query_pb2.StreamHealthResponse.FromString,
        ),
    }
    return early_adopter_implementations.stub(
        "queryservice.Query",
        method_invocation_descriptions,
        host,
        port,
        metadata_transformer=metadata_transformer,
        secure=secure,
        root_certificates=root_certificates,
        private_key=private_key,
        certificate_chain=certificate_chain,
        server_host_override=server_host_override)
Пример #30
0
def early_adopter_create_Vitess_stub(host, port):
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    method_invocation_descriptions = {
        "Begin":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.BeginRequest.SerializeToString,
            vtgate_pb2.BeginResponse.FromString,
        ),
        "Commit":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.CommitRequest.SerializeToString,
            vtgate_pb2.CommitResponse.FromString,
        ),
        "Execute":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteRequest.SerializeToString,
            vtgate_pb2.ExecuteResponse.FromString,
        ),
        "ExecuteBatchKeyspaceIds":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.FromString,
        ),
        "ExecuteBatchShards":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteBatchShardsRequest.SerializeToString,
            vtgate_pb2.ExecuteBatchShardsResponse.FromString,
        ),
        "ExecuteEntityIds":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteEntityIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteEntityIdsResponse.FromString,
        ),
        "ExecuteKeyRanges":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteKeyRangesRequest.SerializeToString,
            vtgate_pb2.ExecuteKeyRangesResponse.FromString,
        ),
        "ExecuteKeyspaceIds":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteKeyspaceIdsResponse.FromString,
        ),
        "ExecuteShards":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteShardsRequest.SerializeToString,
            vtgate_pb2.ExecuteShardsResponse.FromString,
        ),
        "GetSrvKeyspace":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.GetSrvKeyspaceRequest.SerializeToString,
            vtgate_pb2.GetSrvKeyspaceResponse.FromString,
        ),
        "Rollback":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.RollbackRequest.SerializeToString,
            vtgate_pb2.RollbackResponse.FromString,
        ),
        "SplitQuery":
        utilities.unary_unary_invocation_description(
            vtgate_pb2.SplitQueryRequest.SerializeToString,
            vtgate_pb2.SplitQueryResponse.FromString,
        ),
        "StreamExecute":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteRequest.SerializeToString,
            vtgate_pb2.StreamExecuteResponse.FromString,
        ),
        "StreamExecuteKeyRanges":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteKeyRangesRequest.SerializeToString,
            vtgate_pb2.StreamExecuteKeyRangesResponse.FromString,
        ),
        "StreamExecuteKeyspaceIds":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.StreamExecuteKeyspaceIdsResponse.FromString,
        ),
        "StreamExecuteShards":
        utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteShardsRequest.SerializeToString,
            vtgate_pb2.StreamExecuteShardsResponse.FromString,
        ),
    }
    return implementations.insecure_stub("vtgateservice.Vitess",
                                         method_invocation_descriptions, host,
                                         port)
Пример #31
0
def early_adopter_create_Vitess_stub(host,
                                     port,
                                     metadata_transformer=None,
                                     secure=False,
                                     root_certificates=None,
                                     private_key=None,
                                     certificate_chain=None,
                                     server_host_override=None):
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    method_invocation_descriptions = {
        "Begin":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.BeginRequest.SerializeToString,
            vtgate_pb2.BeginResponse.FromString,
        ),
        "Commit":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.CommitRequest.SerializeToString,
            vtgate_pb2.CommitResponse.FromString,
        ),
        "Execute":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteRequest.SerializeToString,
            vtgate_pb2.ExecuteResponse.FromString,
        ),
        "ExecuteBatchKeyspaceIds":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.FromString,
        ),
        "ExecuteBatchShards":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteBatchShardsRequest.SerializeToString,
            vtgate_pb2.ExecuteBatchShardsResponse.FromString,
        ),
        "ExecuteEntityIds":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteEntityIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteEntityIdsResponse.FromString,
        ),
        "ExecuteKeyRanges":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteKeyRangesRequest.SerializeToString,
            vtgate_pb2.ExecuteKeyRangesResponse.FromString,
        ),
        "ExecuteKeyspaceIds":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.ExecuteKeyspaceIdsResponse.FromString,
        ),
        "ExecuteShards":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.ExecuteShardsRequest.SerializeToString,
            vtgate_pb2.ExecuteShardsResponse.FromString,
        ),
        "GetSrvKeyspace":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.GetSrvKeyspaceRequest.SerializeToString,
            vtgate_pb2.GetSrvKeyspaceResponse.FromString,
        ),
        "Rollback":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.RollbackRequest.SerializeToString,
            vtgate_pb2.RollbackResponse.FromString,
        ),
        "SplitQuery":
        alpha_utilities.unary_unary_invocation_description(
            vtgate_pb2.SplitQueryRequest.SerializeToString,
            vtgate_pb2.SplitQueryResponse.FromString,
        ),
        "StreamExecute":
        alpha_utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteRequest.SerializeToString,
            vtgate_pb2.StreamExecuteResponse.FromString,
        ),
        "StreamExecuteKeyRanges":
        alpha_utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteKeyRangesRequest.SerializeToString,
            vtgate_pb2.StreamExecuteKeyRangesResponse.FromString,
        ),
        "StreamExecuteKeyspaceIds":
        alpha_utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString,
            vtgate_pb2.StreamExecuteKeyspaceIdsResponse.FromString,
        ),
        "StreamExecuteShards":
        alpha_utilities.unary_stream_invocation_description(
            vtgate_pb2.StreamExecuteShardsRequest.SerializeToString,
            vtgate_pb2.StreamExecuteShardsResponse.FromString,
        ),
    }
    return early_adopter_implementations.stub(
        "vtgateservice.Vitess",
        method_invocation_descriptions,
        host,
        port,
        metadata_transformer=metadata_transformer,
        secure=secure,
        root_certificates=root_certificates,
        private_key=private_key,
        certificate_chain=certificate_chain,
        server_host_override=server_host_override)