зеркало из https://github.com/github/vitess-gh.git
162 строки
7.8 KiB
Python
162 строки
7.8 KiB
Python
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
# source: automationservice.proto
|
|
|
|
from google.protobuf import descriptor as _descriptor
|
|
from google.protobuf import message as _message
|
|
from google.protobuf import reflection as _reflection
|
|
from google.protobuf import symbol_database as _symbol_database
|
|
from google.protobuf import descriptor_pb2
|
|
# @@protoc_insertion_point(imports)
|
|
|
|
_sym_db = _symbol_database.Default()
|
|
|
|
|
|
import automation_pb2 as automation__pb2
|
|
|
|
|
|
DESCRIPTOR = _descriptor.FileDescriptor(
|
|
name='automationservice.proto',
|
|
package='automationservice',
|
|
syntax='proto3',
|
|
serialized_pb=b'\n\x17\x61utomationservice.proto\x12\x11\x61utomationservice\x1a\x10\x61utomation.proto2\x81\x02\n\nAutomation\x12t\n\x17\x45nqueueClusterOperation\x12*.automation.EnqueueClusterOperationRequest\x1a+.automation.EnqueueClusterOperationResponse\"\x00\x12}\n\x1aGetClusterOperationDetails\x12-.automation.GetClusterOperationDetailsRequest\x1a..automation.GetClusterOperationDetailsResponse\"\x00\x62\x06proto3'
|
|
,
|
|
dependencies=[automation__pb2.DESCRIPTOR,])
|
|
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
|
|
|
|
|
|
|
|
|
|
|
import abc
|
|
from grpc.beta import implementations as beta_implementations
|
|
from grpc.early_adopter import implementations as early_adopter_implementations
|
|
from grpc.framework.alpha import utilities as alpha_utilities
|
|
from grpc.framework.common import cardinality
|
|
from grpc.framework.interfaces.face import utilities as face_utilities
|
|
class EarlyAdopterAutomationServicer(object):
|
|
"""<fill me in later!>"""
|
|
__metaclass__ = abc.ABCMeta
|
|
@abc.abstractmethod
|
|
def EnqueueClusterOperation(self, request, context):
|
|
raise NotImplementedError()
|
|
@abc.abstractmethod
|
|
def GetClusterOperationDetails(self, request, context):
|
|
raise NotImplementedError()
|
|
class EarlyAdopterAutomationServer(object):
|
|
"""<fill me in later!>"""
|
|
__metaclass__ = abc.ABCMeta
|
|
@abc.abstractmethod
|
|
def start(self):
|
|
raise NotImplementedError()
|
|
@abc.abstractmethod
|
|
def stop(self):
|
|
raise NotImplementedError()
|
|
class EarlyAdopterAutomationStub(object):
|
|
"""<fill me in later!>"""
|
|
__metaclass__ = abc.ABCMeta
|
|
@abc.abstractmethod
|
|
def EnqueueClusterOperation(self, request):
|
|
raise NotImplementedError()
|
|
EnqueueClusterOperation.async = None
|
|
@abc.abstractmethod
|
|
def GetClusterOperationDetails(self, request):
|
|
raise NotImplementedError()
|
|
GetClusterOperationDetails.async = None
|
|
def early_adopter_create_Automation_server(servicer, port, private_key=None, certificate_chain=None):
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
method_service_descriptions = {
|
|
"EnqueueClusterOperation": alpha_utilities.unary_unary_service_description(
|
|
servicer.EnqueueClusterOperation,
|
|
automation_pb2.EnqueueClusterOperationRequest.FromString,
|
|
automation_pb2.EnqueueClusterOperationResponse.SerializeToString,
|
|
),
|
|
"GetClusterOperationDetails": alpha_utilities.unary_unary_service_description(
|
|
servicer.GetClusterOperationDetails,
|
|
automation_pb2.GetClusterOperationDetailsRequest.FromString,
|
|
automation_pb2.GetClusterOperationDetailsResponse.SerializeToString,
|
|
),
|
|
}
|
|
return early_adopter_implementations.server("automationservice.Automation", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
|
|
def early_adopter_create_Automation_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
method_invocation_descriptions = {
|
|
"EnqueueClusterOperation": alpha_utilities.unary_unary_invocation_description(
|
|
automation_pb2.EnqueueClusterOperationRequest.SerializeToString,
|
|
automation_pb2.EnqueueClusterOperationResponse.FromString,
|
|
),
|
|
"GetClusterOperationDetails": alpha_utilities.unary_unary_invocation_description(
|
|
automation_pb2.GetClusterOperationDetailsRequest.SerializeToString,
|
|
automation_pb2.GetClusterOperationDetailsResponse.FromString,
|
|
),
|
|
}
|
|
return early_adopter_implementations.stub("automationservice.Automation", 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)
|
|
|
|
class BetaAutomationServicer(object):
|
|
"""<fill me in later!>"""
|
|
__metaclass__ = abc.ABCMeta
|
|
@abc.abstractmethod
|
|
def EnqueueClusterOperation(self, request, context):
|
|
raise NotImplementedError()
|
|
@abc.abstractmethod
|
|
def GetClusterOperationDetails(self, request, context):
|
|
raise NotImplementedError()
|
|
|
|
class BetaAutomationStub(object):
|
|
"""The interface to which stubs will conform."""
|
|
__metaclass__ = abc.ABCMeta
|
|
@abc.abstractmethod
|
|
def EnqueueClusterOperation(self, request, timeout):
|
|
raise NotImplementedError()
|
|
EnqueueClusterOperation.future = None
|
|
@abc.abstractmethod
|
|
def GetClusterOperationDetails(self, request, timeout):
|
|
raise NotImplementedError()
|
|
GetClusterOperationDetails.future = None
|
|
|
|
def beta_create_Automation_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
request_deserializers = {
|
|
('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationRequest.FromString,
|
|
('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsRequest.FromString,
|
|
}
|
|
response_serializers = {
|
|
('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationResponse.SerializeToString,
|
|
('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsResponse.SerializeToString,
|
|
}
|
|
method_implementations = {
|
|
('automationservice.Automation', 'EnqueueClusterOperation'): face_utilities.unary_unary_inline(servicer.EnqueueClusterOperation),
|
|
('automationservice.Automation', 'GetClusterOperationDetails'): face_utilities.unary_unary_inline(servicer.GetClusterOperationDetails),
|
|
}
|
|
server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
|
|
return beta_implementations.server(method_implementations, options=server_options)
|
|
|
|
def beta_create_Automation_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
import automation_pb2
|
|
request_serializers = {
|
|
('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationRequest.SerializeToString,
|
|
('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsRequest.SerializeToString,
|
|
}
|
|
response_deserializers = {
|
|
('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationResponse.FromString,
|
|
('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsResponse.FromString,
|
|
}
|
|
cardinalities = {
|
|
'EnqueueClusterOperation': cardinality.Cardinality.UNARY_UNARY,
|
|
'GetClusterOperationDetails': cardinality.Cardinality.UNARY_UNARY,
|
|
}
|
|
stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
|
|
return beta_implementations.dynamic_stub(channel, 'automationservice.Automation', cardinalities, options=stub_options)
|
|
# @@protoc_insertion_point(module_scope)
|