vermeer/apps/protos/hugegraph-pd-grpc/common/pd_common.pb.go (329 lines of code) (raw):
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this
work for additional information regarding copyright ownership. The ASF
licenses this file to You under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
*/
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.21.1
// source: pd_common.proto
package common
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ErrorType int32
const (
ErrorType_OK ErrorType = 0
ErrorType_UNKNOWN ErrorType = 1
ErrorType_STORE_NON_EXIST ErrorType = 101
ErrorType_STORE_TOMBSTONE ErrorType = 103
ErrorType_ALREADY_BOOTSTRAPPED ErrorType = 4
ErrorType_INCOMPATIBLE_VERSION ErrorType = 5
ErrorType_PARTITION_NOT_FOUND ErrorType = 6
ErrorType_ETCD_READ_ERROR ErrorType = 1000
ErrorType_ETCD_WRITE_ERROR ErrorType = 1001
)
// Enum value maps for ErrorType.
var (
ErrorType_name = map[int32]string{
0: "OK",
1: "UNKNOWN",
101: "STORE_NON_EXIST",
103: "STORE_TOMBSTONE",
4: "ALREADY_BOOTSTRAPPED",
5: "INCOMPATIBLE_VERSION",
6: "PARTITION_NOT_FOUND",
1000: "ETCD_READ_ERROR",
1001: "ETCD_WRITE_ERROR",
}
ErrorType_value = map[string]int32{
"OK": 0,
"UNKNOWN": 1,
"STORE_NON_EXIST": 101,
"STORE_TOMBSTONE": 103,
"ALREADY_BOOTSTRAPPED": 4,
"INCOMPATIBLE_VERSION": 5,
"PARTITION_NOT_FOUND": 6,
"ETCD_READ_ERROR": 1000,
"ETCD_WRITE_ERROR": 1001,
}
)
func (x ErrorType) Enum() *ErrorType {
p := new(ErrorType)
*p = x
return p
}
func (x ErrorType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ErrorType) Descriptor() protoreflect.EnumDescriptor {
return file_pd_common_proto_enumTypes[0].Descriptor()
}
func (ErrorType) Type() protoreflect.EnumType {
return &file_pd_common_proto_enumTypes[0]
}
func (x ErrorType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ErrorType.Descriptor instead.
func (ErrorType) EnumDescriptor() ([]byte, []int) {
return file_pd_common_proto_rawDescGZIP(), []int{0}
}
type RequestHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 集群 ID.
ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
// 发送者 ID.
SenderId uint64 `protobuf:"varint,2,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
}
func (x *RequestHeader) Reset() {
*x = RequestHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_pd_common_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestHeader) ProtoMessage() {}
func (x *RequestHeader) ProtoReflect() protoreflect.Message {
mi := &file_pd_common_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestHeader.ProtoReflect.Descriptor instead.
func (*RequestHeader) Descriptor() ([]byte, []int) {
return file_pd_common_proto_rawDescGZIP(), []int{0}
}
func (x *RequestHeader) GetClusterId() uint64 {
if x != nil {
return x.ClusterId
}
return 0
}
func (x *RequestHeader) GetSenderId() uint64 {
if x != nil {
return x.SenderId
}
return 0
}
type ResponseHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// cluster_id is the ID of the cluster which sent the response.
ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ResponseHeader) Reset() {
*x = ResponseHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_pd_common_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponseHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponseHeader) ProtoMessage() {}
func (x *ResponseHeader) ProtoReflect() protoreflect.Message {
mi := &file_pd_common_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResponseHeader.ProtoReflect.Descriptor instead.
func (*ResponseHeader) Descriptor() ([]byte, []int) {
return file_pd_common_proto_rawDescGZIP(), []int{1}
}
func (x *ResponseHeader) GetClusterId() uint64 {
if x != nil {
return x.ClusterId
}
return 0
}
func (x *ResponseHeader) GetError() *Error {
if x != nil {
return x.Error
}
return nil
}
type Error struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type ErrorType `protobuf:"varint,1,opt,name=type,proto3,enum=ErrorType" json:"type,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Error) Reset() {
*x = Error{}
if protoimpl.UnsafeEnabled {
mi := &file_pd_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Error) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Error) ProtoMessage() {}
func (x *Error) ProtoReflect() protoreflect.Message {
mi := &file_pd_common_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Error.ProtoReflect.Descriptor instead.
func (*Error) Descriptor() ([]byte, []int) {
return file_pd_common_proto_rawDescGZIP(), []int{2}
}
func (x *Error) GetType() ErrorType {
if x != nil {
return x.Type
}
return ErrorType_OK
}
func (x *Error) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
var File_pd_common_proto protoreflect.FileDescriptor
var file_pd_common_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x4b, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x4d,
0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12,
0x1c, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06,
0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a,
0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x2a, 0xc4, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06,
0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
0x4e, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x4e,
0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x4f, 0x52,
0x45, 0x5f, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x10, 0x67, 0x12, 0x18, 0x0a,
0x14, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52,
0x41, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x43, 0x4f, 0x4d,
0x50, 0x41, 0x54, 0x49, 0x42, 0x4c, 0x45, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10,
0x05, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x41, 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e,
0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x54,
0x43, 0x44, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xe8, 0x07,
0x12, 0x15, 0x0a, 0x10, 0x45, 0x54, 0x43, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0xe9, 0x07, 0x42, 0x52, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x62,
0x61, 0x69, 0x64, 0x75, 0x2e, 0x68, 0x75, 0x67, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x70,
0x64, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0x0f, 0x48,
0x67, 0x50, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x19, 0x2f, 0x68, 0x75, 0x67, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2d, 0x70, 0x64, 0x2d,
0x67, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_pd_common_proto_rawDescOnce sync.Once
file_pd_common_proto_rawDescData = file_pd_common_proto_rawDesc
)
func file_pd_common_proto_rawDescGZIP() []byte {
file_pd_common_proto_rawDescOnce.Do(func() {
file_pd_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_pd_common_proto_rawDescData)
})
return file_pd_common_proto_rawDescData
}
var file_pd_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pd_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_pd_common_proto_goTypes = []interface{}{
(ErrorType)(0), // 0: ErrorType
(*RequestHeader)(nil), // 1: RequestHeader
(*ResponseHeader)(nil), // 2: ResponseHeader
(*Error)(nil), // 3: Error
}
var file_pd_common_proto_depIdxs = []int32{
3, // 0: ResponseHeader.error:type_name -> Error
0, // 1: Error.type:type_name -> ErrorType
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_pd_common_proto_init() }
func file_pd_common_proto_init() {
if File_pd_common_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pd_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pd_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResponseHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pd_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Error); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pd_common_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pd_common_proto_goTypes,
DependencyIndexes: file_pd_common_proto_depIdxs,
EnumInfos: file_pd_common_proto_enumTypes,
MessageInfos: file_pd_common_proto_msgTypes,
}.Build()
File_pd_common_proto = out.File
file_pd_common_proto_rawDesc = nil
file_pd_common_proto_goTypes = nil
file_pd_common_proto_depIdxs = nil
}