Moving all python proto-generated files into py/vtproto.

This commit is contained in:
Alain Jobart 2015-07-16 14:07:11 -07:00
Родитель a48247cd63
Коммит 0f5c7562bb
22 изменённых файлов: 13244 добавлений и 9 удалений

Просмотреть файл

@ -181,18 +181,15 @@ v3_test:
bson:
go generate ./go/...
# This rule rebuilds all the go files from the proto definitions for gRPC
# FIXME(alainjobart) also add support for python gRPC stubs, right now
# it's only the proto files without gRPC
# This rule rebuilds all the go files from the proto definitions for gRPC.
# 1. list all proto files.
# 2. remove 'proto/' prefix and '.proto' suffix.
# 3. run protoc for each proto and put in go/vt/proto/${proto_file_name}
# 3. (go) run protoc for each proto and put in go/vt/proto/${proto_file_name}/
# 4. (python) run protoc for each proto and put in py/vtproto/
proto:
find proto -name '*.proto' -print | sed 's/^proto\///' | sed 's/\.proto//' | xargs -I{} $$VTROOT/dist/protobuf/bin/protoc -Iproto proto/{}.proto --go_out=plugins=grpc:go/vt/proto/{}
find go/vt/proto -name "*.pb.go" | xargs sed --in-place -r -e 's,import ([a-z0-9_]+) ".",import \1 "github.com/youtube/vitess/go/vt/proto/\1",g'
cd py/vtctl && $$VTROOT/dist/protobuf/bin/protoc -I../../proto ../../proto/logutil.proto --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=$$VTROOT/dist/grpc/bin/grpc_python_plugin
cd py/vtctl && $$VTROOT/dist/protobuf/bin/protoc -I../../proto ../../proto/vtctldata.proto --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=$$VTROOT/dist/grpc/bin/grpc_python_plugin
cd py/vtctl && $$VTROOT/dist/protobuf/bin/protoc -I../../proto ../../proto/vtctlservice.proto --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=$$VTROOT/dist/grpc/bin/grpc_python_plugin
find proto -name '*.proto' -print | sed 's/^proto\///' | sed 's/\.proto//' | xargs -I{} $$VTROOT/dist/protobuf/bin/protoc -Iproto proto/{}.proto --python_out=py/vtproto --grpc_out=py/vtproto --plugin=protoc-gen-grpc=$$VTROOT/dist/grpc/bin/grpc_python_plugin
# This rule builds the bootstrap images for all flavors.
docker_bootstrap:

Просмотреть файл

@ -10,8 +10,8 @@ import datetime
from urlparse import urlparse
import vtctl_client
import vtctldata_pb2
import vtctlservice_pb2
from vtproto import vtctldata_pb2
from vtproto import vtctlservice_pb2
class GRPCVtctlClient(vtctl_client.VctlClient):
"""GoRpcVtctlClient is the gRPC implementation of VctlClient.

0
py/vtproto/__init__.py Normal file
Просмотреть файл

Просмотреть файл

@ -0,0 +1,631 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: automation.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
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()
DESCRIPTOR = _descriptor.FileDescriptor(
name='automation.proto',
package='automation',
syntax='proto3',
serialized_pb=_b('\n\x10\x61utomation.proto\x12\nautomation\"\x90\x01\n\x10\x43lusterOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12/\n\x0cserial_tasks\x18\x02 \x03(\x0b\x32\x19.automation.TaskContainer\x12\x30\n\x05state\x18\x03 \x01(\x0e\x32!.automation.ClusterOperationState\x12\r\n\x05\x65rror\x18\x04 \x01(\t\"N\n\rTaskContainer\x12(\n\x0eparallel_tasks\x18\x01 \x03(\x0b\x32\x10.automation.Task\x12\x13\n\x0b\x63oncurrency\x18\x02 \x01(\x05\"\xce\x01\n\x04Task\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\nparameters\x18\x02 \x03(\x0b\x32 .automation.Task.ParametersEntry\x12\n\n\x02id\x18\x03 \x01(\t\x12$\n\x05state\x18\x04 \x01(\x0e\x32\x15.automation.TaskState\x12\x0e\n\x06output\x18\x05 \x01(\t\x12\r\n\x05\x65rror\x18\x06 \x01(\t\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb1\x01\n\x1e\x45nqueueClusterOperationRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\nparameters\x18\x02 \x03(\x0b\x32:.automation.EnqueueClusterOperationRequest.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"-\n\x1f\x45nqueueClusterOperationResponse\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\x1fGetClusterOperationStateRequest\x12\n\n\x02id\x18\x01 \x01(\t\"T\n GetClusterOperationStateResponse\x12\x30\n\x05state\x18\x01 \x01(\x0e\x32!.automation.ClusterOperationState\"/\n!GetClusterOperationDetailsRequest\x12\n\n\x02id\x18\x01 \x01(\t\"V\n\"GetClusterOperationDetailsResponse\x12\x30\n\ncluster_op\x18\x02 \x01(\x0b\x32\x1c.automation.ClusterOperation*\x9a\x01\n\x15\x43lusterOperationState\x12#\n\x1fUNKNOWN_CLUSTER_OPERATION_STATE\x10\x00\x12!\n\x1d\x43LUSTER_OPERATION_NOT_STARTED\x10\x01\x12\x1d\n\x19\x43LUSTER_OPERATION_RUNNING\x10\x02\x12\x1a\n\x16\x43LUSTER_OPERATION_DONE\x10\x03*K\n\tTaskState\x12\x16\n\x12UNKNOWN_TASK_STATE\x10\x00\x12\x0f\n\x0bNOT_STARTED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_CLUSTEROPERATIONSTATE = _descriptor.EnumDescriptor(
name='ClusterOperationState',
full_name='automation.ClusterOperationState',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='UNKNOWN_CLUSTER_OPERATION_STATE', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CLUSTER_OPERATION_NOT_STARTED', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CLUSTER_OPERATION_RUNNING', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CLUSTER_OPERATION_DONE', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=966,
serialized_end=1120,
)
_sym_db.RegisterEnumDescriptor(_CLUSTEROPERATIONSTATE)
ClusterOperationState = enum_type_wrapper.EnumTypeWrapper(_CLUSTEROPERATIONSTATE)
_TASKSTATE = _descriptor.EnumDescriptor(
name='TaskState',
full_name='automation.TaskState',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='UNKNOWN_TASK_STATE', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NOT_STARTED', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RUNNING', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DONE', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=1122,
serialized_end=1197,
)
_sym_db.RegisterEnumDescriptor(_TASKSTATE)
TaskState = enum_type_wrapper.EnumTypeWrapper(_TASKSTATE)
UNKNOWN_CLUSTER_OPERATION_STATE = 0
CLUSTER_OPERATION_NOT_STARTED = 1
CLUSTER_OPERATION_RUNNING = 2
CLUSTER_OPERATION_DONE = 3
UNKNOWN_TASK_STATE = 0
NOT_STARTED = 1
RUNNING = 2
DONE = 3
_CLUSTEROPERATION = _descriptor.Descriptor(
name='ClusterOperation',
full_name='automation.ClusterOperation',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='automation.ClusterOperation.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='serial_tasks', full_name='automation.ClusterOperation.serial_tasks', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='state', full_name='automation.ClusterOperation.state', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='error', full_name='automation.ClusterOperation.error', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=33,
serialized_end=177,
)
_TASKCONTAINER = _descriptor.Descriptor(
name='TaskContainer',
full_name='automation.TaskContainer',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='parallel_tasks', full_name='automation.TaskContainer.parallel_tasks', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='concurrency', full_name='automation.TaskContainer.concurrency', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=179,
serialized_end=257,
)
_TASK_PARAMETERSENTRY = _descriptor.Descriptor(
name='ParametersEntry',
full_name='automation.Task.ParametersEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='automation.Task.ParametersEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='automation.Task.ParametersEntry.value', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=417,
serialized_end=466,
)
_TASK = _descriptor.Descriptor(
name='Task',
full_name='automation.Task',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='automation.Task.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parameters', full_name='automation.Task.parameters', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='id', full_name='automation.Task.id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='state', full_name='automation.Task.state', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='output', full_name='automation.Task.output', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='error', full_name='automation.Task.error', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_TASK_PARAMETERSENTRY, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=260,
serialized_end=466,
)
_ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY = _descriptor.Descriptor(
name='ParametersEntry',
full_name='automation.EnqueueClusterOperationRequest.ParametersEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='automation.EnqueueClusterOperationRequest.ParametersEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='automation.EnqueueClusterOperationRequest.ParametersEntry.value', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=417,
serialized_end=466,
)
_ENQUEUECLUSTEROPERATIONREQUEST = _descriptor.Descriptor(
name='EnqueueClusterOperationRequest',
full_name='automation.EnqueueClusterOperationRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='automation.EnqueueClusterOperationRequest.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parameters', full_name='automation.EnqueueClusterOperationRequest.parameters', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=469,
serialized_end=646,
)
_ENQUEUECLUSTEROPERATIONRESPONSE = _descriptor.Descriptor(
name='EnqueueClusterOperationResponse',
full_name='automation.EnqueueClusterOperationResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='automation.EnqueueClusterOperationResponse.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=648,
serialized_end=693,
)
_GETCLUSTEROPERATIONSTATEREQUEST = _descriptor.Descriptor(
name='GetClusterOperationStateRequest',
full_name='automation.GetClusterOperationStateRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='automation.GetClusterOperationStateRequest.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=695,
serialized_end=740,
)
_GETCLUSTEROPERATIONSTATERESPONSE = _descriptor.Descriptor(
name='GetClusterOperationStateResponse',
full_name='automation.GetClusterOperationStateResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='state', full_name='automation.GetClusterOperationStateResponse.state', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=742,
serialized_end=826,
)
_GETCLUSTEROPERATIONDETAILSREQUEST = _descriptor.Descriptor(
name='GetClusterOperationDetailsRequest',
full_name='automation.GetClusterOperationDetailsRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='automation.GetClusterOperationDetailsRequest.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=828,
serialized_end=875,
)
_GETCLUSTEROPERATIONDETAILSRESPONSE = _descriptor.Descriptor(
name='GetClusterOperationDetailsResponse',
full_name='automation.GetClusterOperationDetailsResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='cluster_op', full_name='automation.GetClusterOperationDetailsResponse.cluster_op', index=0,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=877,
serialized_end=963,
)
_CLUSTEROPERATION.fields_by_name['serial_tasks'].message_type = _TASKCONTAINER
_CLUSTEROPERATION.fields_by_name['state'].enum_type = _CLUSTEROPERATIONSTATE
_TASKCONTAINER.fields_by_name['parallel_tasks'].message_type = _TASK
_TASK_PARAMETERSENTRY.containing_type = _TASK
_TASK.fields_by_name['parameters'].message_type = _TASK_PARAMETERSENTRY
_TASK.fields_by_name['state'].enum_type = _TASKSTATE
_ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY.containing_type = _ENQUEUECLUSTEROPERATIONREQUEST
_ENQUEUECLUSTEROPERATIONREQUEST.fields_by_name['parameters'].message_type = _ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY
_GETCLUSTEROPERATIONSTATERESPONSE.fields_by_name['state'].enum_type = _CLUSTEROPERATIONSTATE
_GETCLUSTEROPERATIONDETAILSRESPONSE.fields_by_name['cluster_op'].message_type = _CLUSTEROPERATION
DESCRIPTOR.message_types_by_name['ClusterOperation'] = _CLUSTEROPERATION
DESCRIPTOR.message_types_by_name['TaskContainer'] = _TASKCONTAINER
DESCRIPTOR.message_types_by_name['Task'] = _TASK
DESCRIPTOR.message_types_by_name['EnqueueClusterOperationRequest'] = _ENQUEUECLUSTEROPERATIONREQUEST
DESCRIPTOR.message_types_by_name['EnqueueClusterOperationResponse'] = _ENQUEUECLUSTEROPERATIONRESPONSE
DESCRIPTOR.message_types_by_name['GetClusterOperationStateRequest'] = _GETCLUSTEROPERATIONSTATEREQUEST
DESCRIPTOR.message_types_by_name['GetClusterOperationStateResponse'] = _GETCLUSTEROPERATIONSTATERESPONSE
DESCRIPTOR.message_types_by_name['GetClusterOperationDetailsRequest'] = _GETCLUSTEROPERATIONDETAILSREQUEST
DESCRIPTOR.message_types_by_name['GetClusterOperationDetailsResponse'] = _GETCLUSTEROPERATIONDETAILSRESPONSE
DESCRIPTOR.enum_types_by_name['ClusterOperationState'] = _CLUSTEROPERATIONSTATE
DESCRIPTOR.enum_types_by_name['TaskState'] = _TASKSTATE
ClusterOperation = _reflection.GeneratedProtocolMessageType('ClusterOperation', (_message.Message,), dict(
DESCRIPTOR = _CLUSTEROPERATION,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.ClusterOperation)
))
_sym_db.RegisterMessage(ClusterOperation)
TaskContainer = _reflection.GeneratedProtocolMessageType('TaskContainer', (_message.Message,), dict(
DESCRIPTOR = _TASKCONTAINER,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.TaskContainer)
))
_sym_db.RegisterMessage(TaskContainer)
Task = _reflection.GeneratedProtocolMessageType('Task', (_message.Message,), dict(
ParametersEntry = _reflection.GeneratedProtocolMessageType('ParametersEntry', (_message.Message,), dict(
DESCRIPTOR = _TASK_PARAMETERSENTRY,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.Task.ParametersEntry)
))
,
DESCRIPTOR = _TASK,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.Task)
))
_sym_db.RegisterMessage(Task)
_sym_db.RegisterMessage(Task.ParametersEntry)
EnqueueClusterOperationRequest = _reflection.GeneratedProtocolMessageType('EnqueueClusterOperationRequest', (_message.Message,), dict(
ParametersEntry = _reflection.GeneratedProtocolMessageType('ParametersEntry', (_message.Message,), dict(
DESCRIPTOR = _ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.EnqueueClusterOperationRequest.ParametersEntry)
))
,
DESCRIPTOR = _ENQUEUECLUSTEROPERATIONREQUEST,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.EnqueueClusterOperationRequest)
))
_sym_db.RegisterMessage(EnqueueClusterOperationRequest)
_sym_db.RegisterMessage(EnqueueClusterOperationRequest.ParametersEntry)
EnqueueClusterOperationResponse = _reflection.GeneratedProtocolMessageType('EnqueueClusterOperationResponse', (_message.Message,), dict(
DESCRIPTOR = _ENQUEUECLUSTEROPERATIONRESPONSE,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.EnqueueClusterOperationResponse)
))
_sym_db.RegisterMessage(EnqueueClusterOperationResponse)
GetClusterOperationStateRequest = _reflection.GeneratedProtocolMessageType('GetClusterOperationStateRequest', (_message.Message,), dict(
DESCRIPTOR = _GETCLUSTEROPERATIONSTATEREQUEST,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.GetClusterOperationStateRequest)
))
_sym_db.RegisterMessage(GetClusterOperationStateRequest)
GetClusterOperationStateResponse = _reflection.GeneratedProtocolMessageType('GetClusterOperationStateResponse', (_message.Message,), dict(
DESCRIPTOR = _GETCLUSTEROPERATIONSTATERESPONSE,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.GetClusterOperationStateResponse)
))
_sym_db.RegisterMessage(GetClusterOperationStateResponse)
GetClusterOperationDetailsRequest = _reflection.GeneratedProtocolMessageType('GetClusterOperationDetailsRequest', (_message.Message,), dict(
DESCRIPTOR = _GETCLUSTEROPERATIONDETAILSREQUEST,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.GetClusterOperationDetailsRequest)
))
_sym_db.RegisterMessage(GetClusterOperationDetailsRequest)
GetClusterOperationDetailsResponse = _reflection.GeneratedProtocolMessageType('GetClusterOperationDetailsResponse', (_message.Message,), dict(
DESCRIPTOR = _GETCLUSTEROPERATIONDETAILSRESPONSE,
__module__ = 'automation_pb2'
# @@protoc_insertion_point(class_scope:automation.GetClusterOperationDetailsResponse)
))
_sym_db.RegisterMessage(GetClusterOperationDetailsResponse)
_TASK_PARAMETERSENTRY.has_options = True
_TASK_PARAMETERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
_ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY.has_options = True
_ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope)

Просмотреть файл

@ -0,0 +1,98 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: automationservice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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.early_adopter import implementations
from grpc.framework.alpha import 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": utilities.unary_unary_service_description(
servicer.EnqueueClusterOperation,
automation_pb2.EnqueueClusterOperationRequest.FromString,
automation_pb2.EnqueueClusterOperationResponse.SerializeToString,
),
"GetClusterOperationDetails": utilities.unary_unary_service_description(
servicer.GetClusterOperationDetails,
automation_pb2.GetClusterOperationDetailsRequest.FromString,
automation_pb2.GetClusterOperationDetailsResponse.SerializeToString,
),
}
return 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": utilities.unary_unary_invocation_description(
automation_pb2.EnqueueClusterOperationRequest.SerializeToString,
automation_pb2.EnqueueClusterOperationResponse.FromString,
),
"GetClusterOperationDetails": utilities.unary_unary_invocation_description(
automation_pb2.GetClusterOperationDetailsRequest.SerializeToString,
automation_pb2.GetClusterOperationDetailsResponse.FromString,
),
}
return 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)
# @@protoc_insertion_point(module_scope)

Просмотреть файл

@ -0,0 +1,638 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: binlogdata.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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 query_pb2 as query__pb2
import topodata_pb2 as topodata__pb2
import replicationdata_pb2 as replicationdata__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='binlogdata.proto',
package='binlogdata',
syntax='proto3',
serialized_pb=_b('\n\x10\x62inlogdata.proto\x12\nbinlogdata\x1a\x0bquery.proto\x1a\x0etopodata.proto\x1a\x15replicationdata.proto\"7\n\x07\x43harset\x12\x0e\n\x06\x63lient\x18\x01 \x01(\x05\x12\x0c\n\x04\x63onn\x18\x02 \x01(\x05\x12\x0e\n\x06server\x18\x03 \x01(\x05\"\xe9\x02\n\x11\x42inlogTransaction\x12;\n\nstatements\x18\x01 \x03(\x0b\x32\'.binlogdata.BinlogTransaction.Statement\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12\x0c\n\x04gtid\x18\x03 \x01(\t\x1a\xf5\x01\n\tStatement\x12\x42\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x30.binlogdata.BinlogTransaction.Statement.Category\x12$\n\x07\x63harset\x18\x03 \x01(\x0b\x32\x13.binlogdata.Charset\x12\x0b\n\x03sql\x18\x02 \x01(\x0c\"q\n\x08\x43\x61tegory\x12\x13\n\x0f\x42L_UNRECOGNIZED\x10\x00\x12\x0c\n\x08\x42L_BEGIN\x10\x01\x12\r\n\tBL_COMMIT\x10\x02\x12\x0f\n\x0b\x42L_ROLLBACK\x10\x03\x12\n\n\x06\x42L_DML\x10\x04\x12\n\n\x06\x42L_DDL\x10\x05\x12\n\n\x06\x42L_SET\x10\x06\"\x91\x02\n\x0bStreamEvent\x12\x32\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32 .binlogdata.StreamEvent.Category\x12\x12\n\ntable_name\x18\x02 \x01(\t\x12(\n\x12primary_key_fields\x18\x03 \x03(\x0b\x32\x0c.query.Field\x12&\n\x12primary_key_values\x18\x04 \x03(\x0b\x32\n.query.Row\x12\x0b\n\x03sql\x18\x05 \x01(\t\x12\x11\n\ttimestamp\x18\x06 \x01(\x03\x12\x0c\n\x04gtid\x18\x07 \x01(\t\":\n\x08\x43\x61tegory\x12\n\n\x06SE_ERR\x10\x00\x12\n\n\x06SE_DML\x10\x01\x12\n\n\x06SE_DDL\x10\x02\x12\n\n\x06SE_POS\x10\x03\"B\n\x13StreamUpdateRequest\x12+\n\x08position\x18\x01 \x01(\x0b\x32\x19.replicationdata.Position\"E\n\x14StreamUpdateResponse\x12-\n\x0cstream_event\x18\x01 \x01(\x0b\x32\x17.binlogdata.StreamEvent\"\xc5\x01\n\x15StreamKeyRangeRequest\x12+\n\x08position\x18\x01 \x01(\x0b\x32\x19.replicationdata.Position\x12\x32\n\x10keyspace_id_type\x18\x02 \x01(\x0e\x32\x18.topodata.KeyspaceIdType\x12%\n\tkey_range\x18\x03 \x01(\x0b\x32\x12.topodata.KeyRange\x12$\n\x07\x63harset\x18\x04 \x01(\x0b\x32\x13.binlogdata.Charset\"S\n\x16StreamKeyRangeResponse\x12\x39\n\x12\x62inlog_transaction\x18\x01 \x01(\x0b\x32\x1d.binlogdata.BinlogTransaction\"x\n\x13StreamTablesRequest\x12+\n\x08position\x18\x01 \x01(\x0b\x32\x19.replicationdata.Position\x12\x0e\n\x06tables\x18\x02 \x03(\t\x12$\n\x07\x63harset\x18\x03 \x01(\x0b\x32\x13.binlogdata.Charset\"Q\n\x14StreamTablesResponse\x12\x39\n\x12\x62inlog_transaction\x18\x01 \x01(\x0b\x32\x1d.binlogdata.BinlogTransactionb\x06proto3')
,
dependencies=[query__pb2.DESCRIPTOR,topodata__pb2.DESCRIPTOR,replicationdata__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_BINLOGTRANSACTION_STATEMENT_CATEGORY = _descriptor.EnumDescriptor(
name='Category',
full_name='binlogdata.BinlogTransaction.Statement.Category',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='BL_UNRECOGNIZED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BL_BEGIN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BL_COMMIT', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BL_ROLLBACK', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BL_DML', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BL_DDL', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BL_SET', index=6, number=6,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=390,
serialized_end=503,
)
_sym_db.RegisterEnumDescriptor(_BINLOGTRANSACTION_STATEMENT_CATEGORY)
_STREAMEVENT_CATEGORY = _descriptor.EnumDescriptor(
name='Category',
full_name='binlogdata.StreamEvent.Category',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='SE_ERR', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SE_DML', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SE_DDL', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SE_POS', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=721,
serialized_end=779,
)
_sym_db.RegisterEnumDescriptor(_STREAMEVENT_CATEGORY)
_CHARSET = _descriptor.Descriptor(
name='Charset',
full_name='binlogdata.Charset',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='client', full_name='binlogdata.Charset.client', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='conn', full_name='binlogdata.Charset.conn', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='server', full_name='binlogdata.Charset.server', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=84,
serialized_end=139,
)
_BINLOGTRANSACTION_STATEMENT = _descriptor.Descriptor(
name='Statement',
full_name='binlogdata.BinlogTransaction.Statement',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='category', full_name='binlogdata.BinlogTransaction.Statement.category', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='charset', full_name='binlogdata.BinlogTransaction.Statement.charset', index=1,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sql', full_name='binlogdata.BinlogTransaction.Statement.sql', index=2,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_BINLOGTRANSACTION_STATEMENT_CATEGORY,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=258,
serialized_end=503,
)
_BINLOGTRANSACTION = _descriptor.Descriptor(
name='BinlogTransaction',
full_name='binlogdata.BinlogTransaction',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='statements', full_name='binlogdata.BinlogTransaction.statements', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp', full_name='binlogdata.BinlogTransaction.timestamp', index=1,
number=2, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='gtid', full_name='binlogdata.BinlogTransaction.gtid', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_BINLOGTRANSACTION_STATEMENT, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=142,
serialized_end=503,
)
_STREAMEVENT = _descriptor.Descriptor(
name='StreamEvent',
full_name='binlogdata.StreamEvent',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='category', full_name='binlogdata.StreamEvent.category', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='table_name', full_name='binlogdata.StreamEvent.table_name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='primary_key_fields', full_name='binlogdata.StreamEvent.primary_key_fields', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='primary_key_values', full_name='binlogdata.StreamEvent.primary_key_values', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sql', full_name='binlogdata.StreamEvent.sql', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp', full_name='binlogdata.StreamEvent.timestamp', index=5,
number=6, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='gtid', full_name='binlogdata.StreamEvent.gtid', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_STREAMEVENT_CATEGORY,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=506,
serialized_end=779,
)
_STREAMUPDATEREQUEST = _descriptor.Descriptor(
name='StreamUpdateRequest',
full_name='binlogdata.StreamUpdateRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='position', full_name='binlogdata.StreamUpdateRequest.position', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=781,
serialized_end=847,
)
_STREAMUPDATERESPONSE = _descriptor.Descriptor(
name='StreamUpdateResponse',
full_name='binlogdata.StreamUpdateResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='stream_event', full_name='binlogdata.StreamUpdateResponse.stream_event', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=849,
serialized_end=918,
)
_STREAMKEYRANGEREQUEST = _descriptor.Descriptor(
name='StreamKeyRangeRequest',
full_name='binlogdata.StreamKeyRangeRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='position', full_name='binlogdata.StreamKeyRangeRequest.position', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='keyspace_id_type', full_name='binlogdata.StreamKeyRangeRequest.keyspace_id_type', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='key_range', full_name='binlogdata.StreamKeyRangeRequest.key_range', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='charset', full_name='binlogdata.StreamKeyRangeRequest.charset', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=921,
serialized_end=1118,
)
_STREAMKEYRANGERESPONSE = _descriptor.Descriptor(
name='StreamKeyRangeResponse',
full_name='binlogdata.StreamKeyRangeResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='binlog_transaction', full_name='binlogdata.StreamKeyRangeResponse.binlog_transaction', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1120,
serialized_end=1203,
)
_STREAMTABLESREQUEST = _descriptor.Descriptor(
name='StreamTablesRequest',
full_name='binlogdata.StreamTablesRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='position', full_name='binlogdata.StreamTablesRequest.position', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='tables', full_name='binlogdata.StreamTablesRequest.tables', index=1,
number=2, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='charset', full_name='binlogdata.StreamTablesRequest.charset', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1205,
serialized_end=1325,
)
_STREAMTABLESRESPONSE = _descriptor.Descriptor(
name='StreamTablesResponse',
full_name='binlogdata.StreamTablesResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='binlog_transaction', full_name='binlogdata.StreamTablesResponse.binlog_transaction', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1327,
serialized_end=1408,
)
_BINLOGTRANSACTION_STATEMENT.fields_by_name['category'].enum_type = _BINLOGTRANSACTION_STATEMENT_CATEGORY
_BINLOGTRANSACTION_STATEMENT.fields_by_name['charset'].message_type = _CHARSET
_BINLOGTRANSACTION_STATEMENT.containing_type = _BINLOGTRANSACTION
_BINLOGTRANSACTION_STATEMENT_CATEGORY.containing_type = _BINLOGTRANSACTION_STATEMENT
_BINLOGTRANSACTION.fields_by_name['statements'].message_type = _BINLOGTRANSACTION_STATEMENT
_STREAMEVENT.fields_by_name['category'].enum_type = _STREAMEVENT_CATEGORY
_STREAMEVENT.fields_by_name['primary_key_fields'].message_type = query__pb2._FIELD
_STREAMEVENT.fields_by_name['primary_key_values'].message_type = query__pb2._ROW
_STREAMEVENT_CATEGORY.containing_type = _STREAMEVENT
_STREAMUPDATEREQUEST.fields_by_name['position'].message_type = replicationdata__pb2._POSITION
_STREAMUPDATERESPONSE.fields_by_name['stream_event'].message_type = _STREAMEVENT
_STREAMKEYRANGEREQUEST.fields_by_name['position'].message_type = replicationdata__pb2._POSITION
_STREAMKEYRANGEREQUEST.fields_by_name['keyspace_id_type'].enum_type = topodata__pb2._KEYSPACEIDTYPE
_STREAMKEYRANGEREQUEST.fields_by_name['key_range'].message_type = topodata__pb2._KEYRANGE
_STREAMKEYRANGEREQUEST.fields_by_name['charset'].message_type = _CHARSET
_STREAMKEYRANGERESPONSE.fields_by_name['binlog_transaction'].message_type = _BINLOGTRANSACTION
_STREAMTABLESREQUEST.fields_by_name['position'].message_type = replicationdata__pb2._POSITION
_STREAMTABLESREQUEST.fields_by_name['charset'].message_type = _CHARSET
_STREAMTABLESRESPONSE.fields_by_name['binlog_transaction'].message_type = _BINLOGTRANSACTION
DESCRIPTOR.message_types_by_name['Charset'] = _CHARSET
DESCRIPTOR.message_types_by_name['BinlogTransaction'] = _BINLOGTRANSACTION
DESCRIPTOR.message_types_by_name['StreamEvent'] = _STREAMEVENT
DESCRIPTOR.message_types_by_name['StreamUpdateRequest'] = _STREAMUPDATEREQUEST
DESCRIPTOR.message_types_by_name['StreamUpdateResponse'] = _STREAMUPDATERESPONSE
DESCRIPTOR.message_types_by_name['StreamKeyRangeRequest'] = _STREAMKEYRANGEREQUEST
DESCRIPTOR.message_types_by_name['StreamKeyRangeResponse'] = _STREAMKEYRANGERESPONSE
DESCRIPTOR.message_types_by_name['StreamTablesRequest'] = _STREAMTABLESREQUEST
DESCRIPTOR.message_types_by_name['StreamTablesResponse'] = _STREAMTABLESRESPONSE
Charset = _reflection.GeneratedProtocolMessageType('Charset', (_message.Message,), dict(
DESCRIPTOR = _CHARSET,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.Charset)
))
_sym_db.RegisterMessage(Charset)
BinlogTransaction = _reflection.GeneratedProtocolMessageType('BinlogTransaction', (_message.Message,), dict(
Statement = _reflection.GeneratedProtocolMessageType('Statement', (_message.Message,), dict(
DESCRIPTOR = _BINLOGTRANSACTION_STATEMENT,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.BinlogTransaction.Statement)
))
,
DESCRIPTOR = _BINLOGTRANSACTION,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.BinlogTransaction)
))
_sym_db.RegisterMessage(BinlogTransaction)
_sym_db.RegisterMessage(BinlogTransaction.Statement)
StreamEvent = _reflection.GeneratedProtocolMessageType('StreamEvent', (_message.Message,), dict(
DESCRIPTOR = _STREAMEVENT,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.StreamEvent)
))
_sym_db.RegisterMessage(StreamEvent)
StreamUpdateRequest = _reflection.GeneratedProtocolMessageType('StreamUpdateRequest', (_message.Message,), dict(
DESCRIPTOR = _STREAMUPDATEREQUEST,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.StreamUpdateRequest)
))
_sym_db.RegisterMessage(StreamUpdateRequest)
StreamUpdateResponse = _reflection.GeneratedProtocolMessageType('StreamUpdateResponse', (_message.Message,), dict(
DESCRIPTOR = _STREAMUPDATERESPONSE,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.StreamUpdateResponse)
))
_sym_db.RegisterMessage(StreamUpdateResponse)
StreamKeyRangeRequest = _reflection.GeneratedProtocolMessageType('StreamKeyRangeRequest', (_message.Message,), dict(
DESCRIPTOR = _STREAMKEYRANGEREQUEST,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.StreamKeyRangeRequest)
))
_sym_db.RegisterMessage(StreamKeyRangeRequest)
StreamKeyRangeResponse = _reflection.GeneratedProtocolMessageType('StreamKeyRangeResponse', (_message.Message,), dict(
DESCRIPTOR = _STREAMKEYRANGERESPONSE,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.StreamKeyRangeResponse)
))
_sym_db.RegisterMessage(StreamKeyRangeResponse)
StreamTablesRequest = _reflection.GeneratedProtocolMessageType('StreamTablesRequest', (_message.Message,), dict(
DESCRIPTOR = _STREAMTABLESREQUEST,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.StreamTablesRequest)
))
_sym_db.RegisterMessage(StreamTablesRequest)
StreamTablesResponse = _reflection.GeneratedProtocolMessageType('StreamTablesResponse', (_message.Message,), dict(
DESCRIPTOR = _STREAMTABLESRESPONSE,
__module__ = 'binlogdata_pb2'
# @@protoc_insertion_point(class_scope:binlogdata.StreamTablesResponse)
))
_sym_db.RegisterMessage(StreamTablesResponse)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope)

Просмотреть файл

@ -0,0 +1,118 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: binlogservice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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 binlogdata_pb2 as binlogdata__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='binlogservice.proto',
package='binlogservice',
syntax='proto3',
serialized_pb=_b('\n\x13\x62inlogservice.proto\x12\rbinlogservice\x1a\x10\x62inlogdata.proto2\x99\x02\n\x0cUpdateStream\x12U\n\x0cStreamUpdate\x12\x1f.binlogdata.StreamUpdateRequest\x1a .binlogdata.StreamUpdateResponse\"\x00\x30\x01\x12[\n\x0eStreamKeyRange\x12!.binlogdata.StreamKeyRangeRequest\x1a\".binlogdata.StreamKeyRangeResponse\"\x00\x30\x01\x12U\n\x0cStreamTables\x12\x1f.binlogdata.StreamTablesRequest\x1a .binlogdata.StreamTablesResponse\"\x00\x30\x01\x62\x06proto3')
,
dependencies=[binlogdata__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
class EarlyAdopterUpdateStreamServicer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def StreamUpdate(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamKeyRange(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamTables(self, request, context):
raise NotImplementedError()
class EarlyAdopterUpdateStreamServer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def start(self):
raise NotImplementedError()
@abc.abstractmethod
def stop(self):
raise NotImplementedError()
class EarlyAdopterUpdateStreamStub(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def StreamUpdate(self, request):
raise NotImplementedError()
StreamUpdate.async = None
@abc.abstractmethod
def StreamKeyRange(self, request):
raise NotImplementedError()
StreamKeyRange.async = None
@abc.abstractmethod
def StreamTables(self, request):
raise NotImplementedError()
StreamTables.async = None
def early_adopter_create_UpdateStream_server(servicer, port, private_key=None, certificate_chain=None):
import binlogdata_pb2
import binlogdata_pb2
import binlogdata_pb2
import binlogdata_pb2
import binlogdata_pb2
import binlogdata_pb2
method_service_descriptions = {
"StreamKeyRange": utilities.unary_stream_service_description(
servicer.StreamKeyRange,
binlogdata_pb2.StreamKeyRangeRequest.FromString,
binlogdata_pb2.StreamKeyRangeResponse.SerializeToString,
),
"StreamTables": utilities.unary_stream_service_description(
servicer.StreamTables,
binlogdata_pb2.StreamTablesRequest.FromString,
binlogdata_pb2.StreamTablesResponse.SerializeToString,
),
"StreamUpdate": utilities.unary_stream_service_description(
servicer.StreamUpdate,
binlogdata_pb2.StreamUpdateRequest.FromString,
binlogdata_pb2.StreamUpdateResponse.SerializeToString,
),
}
return implementations.server("binlogservice.UpdateStream", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
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": 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.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)
# @@protoc_insertion_point(module_scope)

Просмотреть файл

315
py/vtproto/mysqlctl_pb2.py Normal file
Просмотреть файл

@ -0,0 +1,315 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mysqlctl.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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()
DESCRIPTOR = _descriptor.FileDescriptor(
name='mysqlctl.proto',
package='mysqlctl',
syntax='proto3',
serialized_pb=_b('\n\x0emysqlctl.proto\x12\x08mysqlctl\"\x0e\n\x0cStartRequest\"\x0f\n\rStartResponse\"*\n\x0fShutdownRequest\x12\x17\n\x0fwait_for_mysqld\x18\x01 \x01(\x08\"\x12\n\x10ShutdownResponse\"\x18\n\x16RunMysqlUpgradeRequest\"\x19\n\x17RunMysqlUpgradeResponse2\xe5\x01\n\x08MysqlCtl\x12:\n\x05Start\x12\x16.mysqlctl.StartRequest\x1a\x17.mysqlctl.StartResponse\"\x00\x12\x43\n\x08Shutdown\x12\x19.mysqlctl.ShutdownRequest\x1a\x1a.mysqlctl.ShutdownResponse\"\x00\x12X\n\x0fRunMysqlUpgrade\x12 .mysqlctl.RunMysqlUpgradeRequest\x1a!.mysqlctl.RunMysqlUpgradeResponse\"\x00\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_STARTREQUEST = _descriptor.Descriptor(
name='StartRequest',
full_name='mysqlctl.StartRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=28,
serialized_end=42,
)
_STARTRESPONSE = _descriptor.Descriptor(
name='StartResponse',
full_name='mysqlctl.StartResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=44,
serialized_end=59,
)
_SHUTDOWNREQUEST = _descriptor.Descriptor(
name='ShutdownRequest',
full_name='mysqlctl.ShutdownRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='wait_for_mysqld', full_name='mysqlctl.ShutdownRequest.wait_for_mysqld', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=61,
serialized_end=103,
)
_SHUTDOWNRESPONSE = _descriptor.Descriptor(
name='ShutdownResponse',
full_name='mysqlctl.ShutdownResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=105,
serialized_end=123,
)
_RUNMYSQLUPGRADEREQUEST = _descriptor.Descriptor(
name='RunMysqlUpgradeRequest',
full_name='mysqlctl.RunMysqlUpgradeRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=125,
serialized_end=149,
)
_RUNMYSQLUPGRADERESPONSE = _descriptor.Descriptor(
name='RunMysqlUpgradeResponse',
full_name='mysqlctl.RunMysqlUpgradeResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=151,
serialized_end=176,
)
DESCRIPTOR.message_types_by_name['StartRequest'] = _STARTREQUEST
DESCRIPTOR.message_types_by_name['StartResponse'] = _STARTRESPONSE
DESCRIPTOR.message_types_by_name['ShutdownRequest'] = _SHUTDOWNREQUEST
DESCRIPTOR.message_types_by_name['ShutdownResponse'] = _SHUTDOWNRESPONSE
DESCRIPTOR.message_types_by_name['RunMysqlUpgradeRequest'] = _RUNMYSQLUPGRADEREQUEST
DESCRIPTOR.message_types_by_name['RunMysqlUpgradeResponse'] = _RUNMYSQLUPGRADERESPONSE
StartRequest = _reflection.GeneratedProtocolMessageType('StartRequest', (_message.Message,), dict(
DESCRIPTOR = _STARTREQUEST,
__module__ = 'mysqlctl_pb2'
# @@protoc_insertion_point(class_scope:mysqlctl.StartRequest)
))
_sym_db.RegisterMessage(StartRequest)
StartResponse = _reflection.GeneratedProtocolMessageType('StartResponse', (_message.Message,), dict(
DESCRIPTOR = _STARTRESPONSE,
__module__ = 'mysqlctl_pb2'
# @@protoc_insertion_point(class_scope:mysqlctl.StartResponse)
))
_sym_db.RegisterMessage(StartResponse)
ShutdownRequest = _reflection.GeneratedProtocolMessageType('ShutdownRequest', (_message.Message,), dict(
DESCRIPTOR = _SHUTDOWNREQUEST,
__module__ = 'mysqlctl_pb2'
# @@protoc_insertion_point(class_scope:mysqlctl.ShutdownRequest)
))
_sym_db.RegisterMessage(ShutdownRequest)
ShutdownResponse = _reflection.GeneratedProtocolMessageType('ShutdownResponse', (_message.Message,), dict(
DESCRIPTOR = _SHUTDOWNRESPONSE,
__module__ = 'mysqlctl_pb2'
# @@protoc_insertion_point(class_scope:mysqlctl.ShutdownResponse)
))
_sym_db.RegisterMessage(ShutdownResponse)
RunMysqlUpgradeRequest = _reflection.GeneratedProtocolMessageType('RunMysqlUpgradeRequest', (_message.Message,), dict(
DESCRIPTOR = _RUNMYSQLUPGRADEREQUEST,
__module__ = 'mysqlctl_pb2'
# @@protoc_insertion_point(class_scope:mysqlctl.RunMysqlUpgradeRequest)
))
_sym_db.RegisterMessage(RunMysqlUpgradeRequest)
RunMysqlUpgradeResponse = _reflection.GeneratedProtocolMessageType('RunMysqlUpgradeResponse', (_message.Message,), dict(
DESCRIPTOR = _RUNMYSQLUPGRADERESPONSE,
__module__ = 'mysqlctl_pb2'
# @@protoc_insertion_point(class_scope:mysqlctl.RunMysqlUpgradeResponse)
))
_sym_db.RegisterMessage(RunMysqlUpgradeResponse)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
class EarlyAdopterMysqlCtlServicer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def Start(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Shutdown(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def RunMysqlUpgrade(self, request, context):
raise NotImplementedError()
class EarlyAdopterMysqlCtlServer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def start(self):
raise NotImplementedError()
@abc.abstractmethod
def stop(self):
raise NotImplementedError()
class EarlyAdopterMysqlCtlStub(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def Start(self, request):
raise NotImplementedError()
Start.async = None
@abc.abstractmethod
def Shutdown(self, request):
raise NotImplementedError()
Shutdown.async = None
@abc.abstractmethod
def RunMysqlUpgrade(self, request):
raise NotImplementedError()
RunMysqlUpgrade.async = None
def early_adopter_create_MysqlCtl_server(servicer, port, private_key=None, certificate_chain=None):
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
method_service_descriptions = {
"RunMysqlUpgrade": utilities.unary_unary_service_description(
servicer.RunMysqlUpgrade,
mysqlctl_pb2.RunMysqlUpgradeRequest.FromString,
mysqlctl_pb2.RunMysqlUpgradeResponse.SerializeToString,
),
"Shutdown": utilities.unary_unary_service_description(
servicer.Shutdown,
mysqlctl_pb2.ShutdownRequest.FromString,
mysqlctl_pb2.ShutdownResponse.SerializeToString,
),
"Start": utilities.unary_unary_service_description(
servicer.Start,
mysqlctl_pb2.StartRequest.FromString,
mysqlctl_pb2.StartResponse.SerializeToString,
),
}
return implementations.server("mysqlctl.MysqlCtl", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
def early_adopter_create_MysqlCtl_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
import mysqlctl_pb2
method_invocation_descriptions = {
"RunMysqlUpgrade": utilities.unary_unary_invocation_description(
mysqlctl_pb2.RunMysqlUpgradeRequest.SerializeToString,
mysqlctl_pb2.RunMysqlUpgradeResponse.FromString,
),
"Shutdown": utilities.unary_unary_invocation_description(
mysqlctl_pb2.ShutdownRequest.SerializeToString,
mysqlctl_pb2.ShutdownResponse.FromString,
),
"Start": utilities.unary_unary_invocation_description(
mysqlctl_pb2.StartRequest.SerializeToString,
mysqlctl_pb2.StartResponse.FromString,
),
}
return implementations.stub("mysqlctl.MysqlCtl", 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)
# @@protoc_insertion_point(module_scope)

1862
py/vtproto/query_pb2.py Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,238 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: queryservice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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 query_pb2 as query__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='queryservice.proto',
package='queryservice',
syntax='proto3',
serialized_pb=_b('\n\x12queryservice.proto\x12\x0cqueryservice\x1a\x0bquery.proto2\xe9\x04\n\x05Query\x12I\n\x0cGetSessionId\x12\x1a.query.GetSessionIdRequest\x1a\x1b.query.GetSessionIdResponse\"\x00\x12:\n\x07\x45xecute\x12\x15.query.ExecuteRequest\x1a\x16.query.ExecuteResponse\"\x00\x12I\n\x0c\x45xecuteBatch\x12\x1a.query.ExecuteBatchRequest\x1a\x1b.query.ExecuteBatchResponse\"\x00\x12N\n\rStreamExecute\x12\x1b.query.StreamExecuteRequest\x1a\x1c.query.StreamExecuteResponse\"\x00\x30\x01\x12\x34\n\x05\x42\x65gin\x12\x13.query.BeginRequest\x1a\x14.query.BeginResponse\"\x00\x12\x37\n\x06\x43ommit\x12\x14.query.CommitRequest\x1a\x15.query.CommitResponse\"\x00\x12=\n\x08Rollback\x12\x16.query.RollbackRequest\x1a\x17.query.RollbackResponse\"\x00\x12\x43\n\nSplitQuery\x12\x18.query.SplitQueryRequest\x1a\x19.query.SplitQueryResponse\"\x00\x12K\n\x0cStreamHealth\x12\x1a.query.StreamHealthRequest\x1a\x1b.query.StreamHealthResponse\"\x00\x30\x01\x62\x06proto3')
,
dependencies=[query__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
class EarlyAdopterQueryServicer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def GetSessionId(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Execute(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def ExecuteBatch(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamExecute(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Begin(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Commit(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Rollback(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def SplitQuery(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamHealth(self, request, context):
raise NotImplementedError()
class EarlyAdopterQueryServer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def start(self):
raise NotImplementedError()
@abc.abstractmethod
def stop(self):
raise NotImplementedError()
class EarlyAdopterQueryStub(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def GetSessionId(self, request):
raise NotImplementedError()
GetSessionId.async = None
@abc.abstractmethod
def Execute(self, request):
raise NotImplementedError()
Execute.async = None
@abc.abstractmethod
def ExecuteBatch(self, request):
raise NotImplementedError()
ExecuteBatch.async = None
@abc.abstractmethod
def StreamExecute(self, request):
raise NotImplementedError()
StreamExecute.async = None
@abc.abstractmethod
def Begin(self, request):
raise NotImplementedError()
Begin.async = None
@abc.abstractmethod
def Commit(self, request):
raise NotImplementedError()
Commit.async = None
@abc.abstractmethod
def Rollback(self, request):
raise NotImplementedError()
Rollback.async = None
@abc.abstractmethod
def SplitQuery(self, request):
raise NotImplementedError()
SplitQuery.async = None
@abc.abstractmethod
def StreamHealth(self, request):
raise NotImplementedError()
StreamHealth.async = None
def early_adopter_create_Query_server(servicer, port, private_key=None, certificate_chain=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_service_descriptions = {
"Begin": utilities.unary_unary_service_description(
servicer.Begin,
query_pb2.BeginRequest.FromString,
query_pb2.BeginResponse.SerializeToString,
),
"Commit": utilities.unary_unary_service_description(
servicer.Commit,
query_pb2.CommitRequest.FromString,
query_pb2.CommitResponse.SerializeToString,
),
"Execute": utilities.unary_unary_service_description(
servicer.Execute,
query_pb2.ExecuteRequest.FromString,
query_pb2.ExecuteResponse.SerializeToString,
),
"ExecuteBatch": utilities.unary_unary_service_description(
servicer.ExecuteBatch,
query_pb2.ExecuteBatchRequest.FromString,
query_pb2.ExecuteBatchResponse.SerializeToString,
),
"GetSessionId": utilities.unary_unary_service_description(
servicer.GetSessionId,
query_pb2.GetSessionIdRequest.FromString,
query_pb2.GetSessionIdResponse.SerializeToString,
),
"Rollback": utilities.unary_unary_service_description(
servicer.Rollback,
query_pb2.RollbackRequest.FromString,
query_pb2.RollbackResponse.SerializeToString,
),
"SplitQuery": utilities.unary_unary_service_description(
servicer.SplitQuery,
query_pb2.SplitQueryRequest.FromString,
query_pb2.SplitQueryResponse.SerializeToString,
),
"StreamExecute": utilities.unary_stream_service_description(
servicer.StreamExecute,
query_pb2.StreamExecuteRequest.FromString,
query_pb2.StreamExecuteResponse.SerializeToString,
),
"StreamHealth": utilities.unary_stream_service_description(
servicer.StreamHealth,
query_pb2.StreamHealthRequest.FromString,
query_pb2.StreamHealthResponse.SerializeToString,
),
}
return implementations.server("queryservice.Query", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
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": 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.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)
# @@protoc_insertion_point(module_scope)

Просмотреть файл

@ -0,0 +1,349 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: replicationdata.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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()
DESCRIPTOR = _descriptor.FileDescriptor(
name='replicationdata.proto',
package='replicationdata',
syntax='proto3',
serialized_pb=_b('\n\x15replicationdata.proto\x12\x0freplicationdata\"?\n\x0bMariadbGtid\x12\x0e\n\x06\x64omain\x18\x01 \x01(\r\x12\x0e\n\x06server\x18\x02 \x01(\r\x12\x10\n\x08sequence\x18\x03 \x01(\x04\"\xd7\x01\n\x0cMysqlGtidSet\x12<\n\x08uuid_set\x18\x01 \x03(\x0b\x32*.replicationdata.MysqlGtidSet.MysqlUuidSet\x1a,\n\rMysqlInterval\x12\r\n\x05\x66irst\x18\x01 \x01(\x04\x12\x0c\n\x04last\x18\x02 \x01(\x04\x1a[\n\x0cMysqlUuidSet\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12=\n\x08interval\x18\x02 \x03(\x0b\x32+.replicationdata.MysqlGtidSet.MysqlInterval\"u\n\x08Position\x12\x32\n\x0cmariadb_gtid\x18\x01 \x01(\x0b\x32\x1c.replicationdata.MariadbGtid\x12\x35\n\x0emysql_gtid_set\x18\x02 \x01(\x0b\x32\x1d.replicationdata.MysqlGtidSet\"\xd1\x01\n\x06Status\x12+\n\x08position\x18\x01 \x01(\x0b\x32\x19.replicationdata.Position\x12\x18\n\x10slave_io_running\x18\x02 \x01(\x08\x12\x19\n\x11slave_sql_running\x18\x03 \x01(\x08\x12\x1d\n\x15seconds_behind_master\x18\x04 \x01(\r\x12\x13\n\x0bmaster_host\x18\x05 \x01(\t\x12\x13\n\x0bmaster_port\x18\x06 \x01(\x05\x12\x1c\n\x14master_connect_retry\x18\x07 \x01(\x05\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_MARIADBGTID = _descriptor.Descriptor(
name='MariadbGtid',
full_name='replicationdata.MariadbGtid',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='domain', full_name='replicationdata.MariadbGtid.domain', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='server', full_name='replicationdata.MariadbGtid.server', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sequence', full_name='replicationdata.MariadbGtid.sequence', index=2,
number=3, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=42,
serialized_end=105,
)
_MYSQLGTIDSET_MYSQLINTERVAL = _descriptor.Descriptor(
name='MysqlInterval',
full_name='replicationdata.MysqlGtidSet.MysqlInterval',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='first', full_name='replicationdata.MysqlGtidSet.MysqlInterval.first', index=0,
number=1, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='last', full_name='replicationdata.MysqlGtidSet.MysqlInterval.last', index=1,
number=2, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=186,
serialized_end=230,
)
_MYSQLGTIDSET_MYSQLUUIDSET = _descriptor.Descriptor(
name='MysqlUuidSet',
full_name='replicationdata.MysqlGtidSet.MysqlUuidSet',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='uuid', full_name='replicationdata.MysqlGtidSet.MysqlUuidSet.uuid', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='interval', full_name='replicationdata.MysqlGtidSet.MysqlUuidSet.interval', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=232,
serialized_end=323,
)
_MYSQLGTIDSET = _descriptor.Descriptor(
name='MysqlGtidSet',
full_name='replicationdata.MysqlGtidSet',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='uuid_set', full_name='replicationdata.MysqlGtidSet.uuid_set', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_MYSQLGTIDSET_MYSQLINTERVAL, _MYSQLGTIDSET_MYSQLUUIDSET, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=108,
serialized_end=323,
)
_POSITION = _descriptor.Descriptor(
name='Position',
full_name='replicationdata.Position',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='mariadb_gtid', full_name='replicationdata.Position.mariadb_gtid', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='mysql_gtid_set', full_name='replicationdata.Position.mysql_gtid_set', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=325,
serialized_end=442,
)
_STATUS = _descriptor.Descriptor(
name='Status',
full_name='replicationdata.Status',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='position', full_name='replicationdata.Status.position', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='slave_io_running', full_name='replicationdata.Status.slave_io_running', index=1,
number=2, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='slave_sql_running', full_name='replicationdata.Status.slave_sql_running', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='seconds_behind_master', full_name='replicationdata.Status.seconds_behind_master', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='master_host', full_name='replicationdata.Status.master_host', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='master_port', full_name='replicationdata.Status.master_port', index=5,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='master_connect_retry', full_name='replicationdata.Status.master_connect_retry', index=6,
number=7, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=445,
serialized_end=654,
)
_MYSQLGTIDSET_MYSQLINTERVAL.containing_type = _MYSQLGTIDSET
_MYSQLGTIDSET_MYSQLUUIDSET.fields_by_name['interval'].message_type = _MYSQLGTIDSET_MYSQLINTERVAL
_MYSQLGTIDSET_MYSQLUUIDSET.containing_type = _MYSQLGTIDSET
_MYSQLGTIDSET.fields_by_name['uuid_set'].message_type = _MYSQLGTIDSET_MYSQLUUIDSET
_POSITION.fields_by_name['mariadb_gtid'].message_type = _MARIADBGTID
_POSITION.fields_by_name['mysql_gtid_set'].message_type = _MYSQLGTIDSET
_STATUS.fields_by_name['position'].message_type = _POSITION
DESCRIPTOR.message_types_by_name['MariadbGtid'] = _MARIADBGTID
DESCRIPTOR.message_types_by_name['MysqlGtidSet'] = _MYSQLGTIDSET
DESCRIPTOR.message_types_by_name['Position'] = _POSITION
DESCRIPTOR.message_types_by_name['Status'] = _STATUS
MariadbGtid = _reflection.GeneratedProtocolMessageType('MariadbGtid', (_message.Message,), dict(
DESCRIPTOR = _MARIADBGTID,
__module__ = 'replicationdata_pb2'
# @@protoc_insertion_point(class_scope:replicationdata.MariadbGtid)
))
_sym_db.RegisterMessage(MariadbGtid)
MysqlGtidSet = _reflection.GeneratedProtocolMessageType('MysqlGtidSet', (_message.Message,), dict(
MysqlInterval = _reflection.GeneratedProtocolMessageType('MysqlInterval', (_message.Message,), dict(
DESCRIPTOR = _MYSQLGTIDSET_MYSQLINTERVAL,
__module__ = 'replicationdata_pb2'
# @@protoc_insertion_point(class_scope:replicationdata.MysqlGtidSet.MysqlInterval)
))
,
MysqlUuidSet = _reflection.GeneratedProtocolMessageType('MysqlUuidSet', (_message.Message,), dict(
DESCRIPTOR = _MYSQLGTIDSET_MYSQLUUIDSET,
__module__ = 'replicationdata_pb2'
# @@protoc_insertion_point(class_scope:replicationdata.MysqlGtidSet.MysqlUuidSet)
))
,
DESCRIPTOR = _MYSQLGTIDSET,
__module__ = 'replicationdata_pb2'
# @@protoc_insertion_point(class_scope:replicationdata.MysqlGtidSet)
))
_sym_db.RegisterMessage(MysqlGtidSet)
_sym_db.RegisterMessage(MysqlGtidSet.MysqlInterval)
_sym_db.RegisterMessage(MysqlGtidSet.MysqlUuidSet)
Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Message,), dict(
DESCRIPTOR = _POSITION,
__module__ = 'replicationdata_pb2'
# @@protoc_insertion_point(class_scope:replicationdata.Position)
))
_sym_db.RegisterMessage(Position)
Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), dict(
DESCRIPTOR = _STATUS,
__module__ = 'replicationdata_pb2'
# @@protoc_insertion_point(class_scope:replicationdata.Status)
))
_sym_db.RegisterMessage(Status)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope)

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

1414
py/vtproto/topodata_pb2.py Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

Просмотреть файл

2271
py/vtproto/vtgate_pb2.py Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,358 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vtgateservice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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 vtgate_pb2 as vtgate__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='vtgateservice.proto',
package='vtgateservice',
syntax='proto3',
serialized_pb=_b('\n\x13vtgateservice.proto\x12\rvtgateservice\x1a\x0cvtgate.proto2\x85\n\n\x06Vitess\x12<\n\x07\x45xecute\x12\x16.vtgate.ExecuteRequest\x1a\x17.vtgate.ExecuteResponse\"\x00\x12N\n\rExecuteShards\x12\x1c.vtgate.ExecuteShardsRequest\x1a\x1d.vtgate.ExecuteShardsResponse\"\x00\x12]\n\x12\x45xecuteKeyspaceIds\x12!.vtgate.ExecuteKeyspaceIdsRequest\x1a\".vtgate.ExecuteKeyspaceIdsResponse\"\x00\x12W\n\x10\x45xecuteKeyRanges\x12\x1f.vtgate.ExecuteKeyRangesRequest\x1a .vtgate.ExecuteKeyRangesResponse\"\x00\x12W\n\x10\x45xecuteEntityIds\x12\x1f.vtgate.ExecuteEntityIdsRequest\x1a .vtgate.ExecuteEntityIdsResponse\"\x00\x12]\n\x12\x45xecuteBatchShards\x12!.vtgate.ExecuteBatchShardsRequest\x1a\".vtgate.ExecuteBatchShardsResponse\"\x00\x12l\n\x17\x45xecuteBatchKeyspaceIds\x12&.vtgate.ExecuteBatchKeyspaceIdsRequest\x1a\'.vtgate.ExecuteBatchKeyspaceIdsResponse\"\x00\x12P\n\rStreamExecute\x12\x1c.vtgate.StreamExecuteRequest\x1a\x1d.vtgate.StreamExecuteResponse\"\x00\x30\x01\x12\x62\n\x13StreamExecuteShards\x12\".vtgate.StreamExecuteShardsRequest\x1a#.vtgate.StreamExecuteShardsResponse\"\x00\x30\x01\x12q\n\x18StreamExecuteKeyspaceIds\x12\'.vtgate.StreamExecuteKeyspaceIdsRequest\x1a(.vtgate.StreamExecuteKeyspaceIdsResponse\"\x00\x30\x01\x12k\n\x16StreamExecuteKeyRanges\x12%.vtgate.StreamExecuteKeyRangesRequest\x1a&.vtgate.StreamExecuteKeyRangesResponse\"\x00\x30\x01\x12\x36\n\x05\x42\x65gin\x12\x14.vtgate.BeginRequest\x1a\x15.vtgate.BeginResponse\"\x00\x12\x39\n\x06\x43ommit\x12\x15.vtgate.CommitRequest\x1a\x16.vtgate.CommitResponse\"\x00\x12?\n\x08Rollback\x12\x17.vtgate.RollbackRequest\x1a\x18.vtgate.RollbackResponse\"\x00\x12\x45\n\nSplitQuery\x12\x19.vtgate.SplitQueryRequest\x1a\x1a.vtgate.SplitQueryResponse\"\x00\x62\x06proto3')
,
dependencies=[vtgate__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
class EarlyAdopterVitessServicer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def Execute(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def ExecuteShards(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def ExecuteKeyspaceIds(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def ExecuteKeyRanges(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def ExecuteEntityIds(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def ExecuteBatchShards(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def ExecuteBatchKeyspaceIds(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamExecute(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamExecuteShards(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamExecuteKeyspaceIds(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def StreamExecuteKeyRanges(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Begin(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Commit(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def Rollback(self, request, context):
raise NotImplementedError()
@abc.abstractmethod
def SplitQuery(self, request, context):
raise NotImplementedError()
class EarlyAdopterVitessServer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def start(self):
raise NotImplementedError()
@abc.abstractmethod
def stop(self):
raise NotImplementedError()
class EarlyAdopterVitessStub(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def Execute(self, request):
raise NotImplementedError()
Execute.async = None
@abc.abstractmethod
def ExecuteShards(self, request):
raise NotImplementedError()
ExecuteShards.async = None
@abc.abstractmethod
def ExecuteKeyspaceIds(self, request):
raise NotImplementedError()
ExecuteKeyspaceIds.async = None
@abc.abstractmethod
def ExecuteKeyRanges(self, request):
raise NotImplementedError()
ExecuteKeyRanges.async = None
@abc.abstractmethod
def ExecuteEntityIds(self, request):
raise NotImplementedError()
ExecuteEntityIds.async = None
@abc.abstractmethod
def ExecuteBatchShards(self, request):
raise NotImplementedError()
ExecuteBatchShards.async = None
@abc.abstractmethod
def ExecuteBatchKeyspaceIds(self, request):
raise NotImplementedError()
ExecuteBatchKeyspaceIds.async = None
@abc.abstractmethod
def StreamExecute(self, request):
raise NotImplementedError()
StreamExecute.async = None
@abc.abstractmethod
def StreamExecuteShards(self, request):
raise NotImplementedError()
StreamExecuteShards.async = None
@abc.abstractmethod
def StreamExecuteKeyspaceIds(self, request):
raise NotImplementedError()
StreamExecuteKeyspaceIds.async = None
@abc.abstractmethod
def StreamExecuteKeyRanges(self, request):
raise NotImplementedError()
StreamExecuteKeyRanges.async = None
@abc.abstractmethod
def Begin(self, request):
raise NotImplementedError()
Begin.async = None
@abc.abstractmethod
def Commit(self, request):
raise NotImplementedError()
Commit.async = None
@abc.abstractmethod
def Rollback(self, request):
raise NotImplementedError()
Rollback.async = None
@abc.abstractmethod
def SplitQuery(self, request):
raise NotImplementedError()
SplitQuery.async = None
def early_adopter_create_Vitess_server(servicer, port, private_key=None, certificate_chain=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
method_service_descriptions = {
"Begin": utilities.unary_unary_service_description(
servicer.Begin,
vtgate_pb2.BeginRequest.FromString,
vtgate_pb2.BeginResponse.SerializeToString,
),
"Commit": utilities.unary_unary_service_description(
servicer.Commit,
vtgate_pb2.CommitRequest.FromString,
vtgate_pb2.CommitResponse.SerializeToString,
),
"Execute": utilities.unary_unary_service_description(
servicer.Execute,
vtgate_pb2.ExecuteRequest.FromString,
vtgate_pb2.ExecuteResponse.SerializeToString,
),
"ExecuteBatchKeyspaceIds": utilities.unary_unary_service_description(
servicer.ExecuteBatchKeyspaceIds,
vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.FromString,
vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.SerializeToString,
),
"ExecuteBatchShards": utilities.unary_unary_service_description(
servicer.ExecuteBatchShards,
vtgate_pb2.ExecuteBatchShardsRequest.FromString,
vtgate_pb2.ExecuteBatchShardsResponse.SerializeToString,
),
"ExecuteEntityIds": utilities.unary_unary_service_description(
servicer.ExecuteEntityIds,
vtgate_pb2.ExecuteEntityIdsRequest.FromString,
vtgate_pb2.ExecuteEntityIdsResponse.SerializeToString,
),
"ExecuteKeyRanges": utilities.unary_unary_service_description(
servicer.ExecuteKeyRanges,
vtgate_pb2.ExecuteKeyRangesRequest.FromString,
vtgate_pb2.ExecuteKeyRangesResponse.SerializeToString,
),
"ExecuteKeyspaceIds": utilities.unary_unary_service_description(
servicer.ExecuteKeyspaceIds,
vtgate_pb2.ExecuteKeyspaceIdsRequest.FromString,
vtgate_pb2.ExecuteKeyspaceIdsResponse.SerializeToString,
),
"ExecuteShards": utilities.unary_unary_service_description(
servicer.ExecuteShards,
vtgate_pb2.ExecuteShardsRequest.FromString,
vtgate_pb2.ExecuteShardsResponse.SerializeToString,
),
"Rollback": utilities.unary_unary_service_description(
servicer.Rollback,
vtgate_pb2.RollbackRequest.FromString,
vtgate_pb2.RollbackResponse.SerializeToString,
),
"SplitQuery": utilities.unary_unary_service_description(
servicer.SplitQuery,
vtgate_pb2.SplitQueryRequest.FromString,
vtgate_pb2.SplitQueryResponse.SerializeToString,
),
"StreamExecute": utilities.unary_stream_service_description(
servicer.StreamExecute,
vtgate_pb2.StreamExecuteRequest.FromString,
vtgate_pb2.StreamExecuteResponse.SerializeToString,
),
"StreamExecuteKeyRanges": utilities.unary_stream_service_description(
servicer.StreamExecuteKeyRanges,
vtgate_pb2.StreamExecuteKeyRangesRequest.FromString,
vtgate_pb2.StreamExecuteKeyRangesResponse.SerializeToString,
),
"StreamExecuteKeyspaceIds": utilities.unary_stream_service_description(
servicer.StreamExecuteKeyspaceIds,
vtgate_pb2.StreamExecuteKeyspaceIdsRequest.FromString,
vtgate_pb2.StreamExecuteKeyspaceIdsResponse.SerializeToString,
),
"StreamExecuteShards": utilities.unary_stream_service_description(
servicer.StreamExecuteShards,
vtgate_pb2.StreamExecuteShardsRequest.FromString,
vtgate_pb2.StreamExecuteShardsResponse.SerializeToString,
),
}
return implementations.server("vtgateservice.Vitess", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
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
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,
),
"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)
# @@protoc_insertion_point(module_scope)

175
py/vtproto/vtrpc_pb2.py Normal file
Просмотреть файл

@ -0,0 +1,175 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vtrpc.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
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()
DESCRIPTOR = _descriptor.FileDescriptor(
name='vtrpc.proto',
package='vtrpc',
syntax='proto3',
serialized_pb=_b('\n\x0bvtrpc.proto\x12\x05vtrpc\"F\n\x08\x43\x61llerID\x12\x11\n\tprincipal\x18\x01 \x01(\t\x12\x11\n\tcomponent\x18\x02 \x01(\t\x12\x14\n\x0csubcomponent\x18\x03 \x01(\t\";\n\x08RPCError\x12\x1e\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x10.vtrpc.ErrorCode\x12\x0f\n\x07message\x18\x02 \x01(\t*n\n\tErrorCode\x12\x0b\n\x07NoError\x10\x00\x12\x10\n\x0bTabletError\x10\xe8\x07\x12\x17\n\x12UnknownTabletError\x10\xcf\x0f\x12\x10\n\x0bVtgateError\x10\xd0\x0f\x12\x17\n\x12UnknownVtgateError\x10\xb7\x17\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_ERRORCODE = _descriptor.EnumDescriptor(
name='ErrorCode',
full_name='vtrpc.ErrorCode',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='NoError', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TabletError', index=1, number=1000,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='UnknownTabletError', index=2, number=1999,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='VtgateError', index=3, number=2000,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='UnknownVtgateError', index=4, number=2999,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=155,
serialized_end=265,
)
_sym_db.RegisterEnumDescriptor(_ERRORCODE)
ErrorCode = enum_type_wrapper.EnumTypeWrapper(_ERRORCODE)
NoError = 0
TabletError = 1000
UnknownTabletError = 1999
VtgateError = 2000
UnknownVtgateError = 2999
_CALLERID = _descriptor.Descriptor(
name='CallerID',
full_name='vtrpc.CallerID',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='principal', full_name='vtrpc.CallerID.principal', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='component', full_name='vtrpc.CallerID.component', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='subcomponent', full_name='vtrpc.CallerID.subcomponent', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=22,
serialized_end=92,
)
_RPCERROR = _descriptor.Descriptor(
name='RPCError',
full_name='vtrpc.RPCError',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='code', full_name='vtrpc.RPCError.code', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='message', full_name='vtrpc.RPCError.message', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=94,
serialized_end=153,
)
_RPCERROR.fields_by_name['code'].enum_type = _ERRORCODE
DESCRIPTOR.message_types_by_name['CallerID'] = _CALLERID
DESCRIPTOR.message_types_by_name['RPCError'] = _RPCERROR
DESCRIPTOR.enum_types_by_name['ErrorCode'] = _ERRORCODE
CallerID = _reflection.GeneratedProtocolMessageType('CallerID', (_message.Message,), dict(
DESCRIPTOR = _CALLERID,
__module__ = 'vtrpc_pb2'
# @@protoc_insertion_point(class_scope:vtrpc.CallerID)
))
_sym_db.RegisterMessage(CallerID)
RPCError = _reflection.GeneratedProtocolMessageType('RPCError', (_message.Message,), dict(
DESCRIPTOR = _RPCERROR,
__module__ = 'vtrpc_pb2'
# @@protoc_insertion_point(class_scope:vtrpc.RPCError)
))
_sym_db.RegisterMessage(RPCError)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope)

Просмотреть файл

@ -0,0 +1,114 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vtworkerdata.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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 logutil_pb2 as logutil__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='vtworkerdata.proto',
package='vtworkerdata',
syntax='proto3',
serialized_pb=_b('\n\x12vtworkerdata.proto\x12\x0cvtworkerdata\x1a\rlogutil.proto\"-\n\x1d\x45xecuteVtworkerCommandRequest\x12\x0c\n\x04\x61rgs\x18\x01 \x03(\t\"?\n\x1e\x45xecuteVtworkerCommandResponse\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.logutil.Eventb\x06proto3')
,
dependencies=[logutil__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_EXECUTEVTWORKERCOMMANDREQUEST = _descriptor.Descriptor(
name='ExecuteVtworkerCommandRequest',
full_name='vtworkerdata.ExecuteVtworkerCommandRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='args', full_name='vtworkerdata.ExecuteVtworkerCommandRequest.args', index=0,
number=1, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=51,
serialized_end=96,
)
_EXECUTEVTWORKERCOMMANDRESPONSE = _descriptor.Descriptor(
name='ExecuteVtworkerCommandResponse',
full_name='vtworkerdata.ExecuteVtworkerCommandResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='event', full_name='vtworkerdata.ExecuteVtworkerCommandResponse.event', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=98,
serialized_end=161,
)
_EXECUTEVTWORKERCOMMANDRESPONSE.fields_by_name['event'].message_type = logutil__pb2._EVENT
DESCRIPTOR.message_types_by_name['ExecuteVtworkerCommandRequest'] = _EXECUTEVTWORKERCOMMANDREQUEST
DESCRIPTOR.message_types_by_name['ExecuteVtworkerCommandResponse'] = _EXECUTEVTWORKERCOMMANDRESPONSE
ExecuteVtworkerCommandRequest = _reflection.GeneratedProtocolMessageType('ExecuteVtworkerCommandRequest', (_message.Message,), dict(
DESCRIPTOR = _EXECUTEVTWORKERCOMMANDREQUEST,
__module__ = 'vtworkerdata_pb2'
# @@protoc_insertion_point(class_scope:vtworkerdata.ExecuteVtworkerCommandRequest)
))
_sym_db.RegisterMessage(ExecuteVtworkerCommandRequest)
ExecuteVtworkerCommandResponse = _reflection.GeneratedProtocolMessageType('ExecuteVtworkerCommandResponse', (_message.Message,), dict(
DESCRIPTOR = _EXECUTEVTWORKERCOMMANDRESPONSE,
__module__ = 'vtworkerdata_pb2'
# @@protoc_insertion_point(class_scope:vtworkerdata.ExecuteVtworkerCommandResponse)
))
_sym_db.RegisterMessage(ExecuteVtworkerCommandResponse)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope)

Просмотреть файл

@ -0,0 +1,78 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vtworkerservice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
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 vtworkerdata_pb2 as vtworkerdata__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='vtworkerservice.proto',
package='vtworkerservice',
syntax='proto3',
serialized_pb=_b('\n\x15vtworkerservice.proto\x12\x0fvtworkerservice\x1a\x12vtworkerdata.proto2\x83\x01\n\x08Vtworker\x12w\n\x16\x45xecuteVtworkerCommand\x12+.vtworkerdata.ExecuteVtworkerCommandRequest\x1a,.vtworkerdata.ExecuteVtworkerCommandResponse\"\x00\x30\x01\x62\x06proto3')
,
dependencies=[vtworkerdata__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
import abc
from grpc.early_adopter import implementations
from grpc.framework.alpha import utilities
class EarlyAdopterVtworkerServicer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def ExecuteVtworkerCommand(self, request, context):
raise NotImplementedError()
class EarlyAdopterVtworkerServer(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def start(self):
raise NotImplementedError()
@abc.abstractmethod
def stop(self):
raise NotImplementedError()
class EarlyAdopterVtworkerStub(object):
"""<fill me in later!>"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def ExecuteVtworkerCommand(self, request):
raise NotImplementedError()
ExecuteVtworkerCommand.async = None
def early_adopter_create_Vtworker_server(servicer, port, private_key=None, certificate_chain=None):
import vtworkerdata_pb2
import vtworkerdata_pb2
method_service_descriptions = {
"ExecuteVtworkerCommand": utilities.unary_stream_service_description(
servicer.ExecuteVtworkerCommand,
vtworkerdata_pb2.ExecuteVtworkerCommandRequest.FromString,
vtworkerdata_pb2.ExecuteVtworkerCommandResponse.SerializeToString,
),
}
return implementations.server("vtworkerservice.Vtworker", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
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)
# @@protoc_insertion_point(module_scope)