feat: add go protobuf generation (#6)
* feat: add go protobuf generation * ci: check go protbuf generation * refactor: use 'namely/protoc-all:1.51_1' to compile the proto instead of locally binary * refactor: no need to add the 'bin/' igore * chore: modify code format * refactor: add some comments to describe our modification
This commit is contained in:
@@ -0,0 +1,262 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.6
|
||||
// source: greptime/v1/meta/cluster.proto
|
||||
|
||||
package meta
|
||||
|
||||
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 BatchGetRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
|
||||
}
|
||||
|
||||
func (x *BatchGetRequest) Reset() {
|
||||
*x = BatchGetRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_cluster_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BatchGetRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BatchGetRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BatchGetRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_cluster_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 BatchGetRequest.ProtoReflect.Descriptor instead.
|
||||
func (*BatchGetRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_cluster_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *BatchGetRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BatchGetRequest) GetKeys() [][]byte {
|
||||
if x != nil {
|
||||
return x.Keys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BatchGetResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Kvs []*KeyValue `protobuf:"bytes,2,rep,name=kvs,proto3" json:"kvs,omitempty"`
|
||||
}
|
||||
|
||||
func (x *BatchGetResponse) Reset() {
|
||||
*x = BatchGetResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_cluster_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BatchGetResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BatchGetResponse) ProtoMessage() {}
|
||||
|
||||
func (x *BatchGetResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_cluster_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 BatchGetResponse.ProtoReflect.Descriptor instead.
|
||||
func (*BatchGetResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_cluster_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *BatchGetResponse) GetHeader() *ResponseHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BatchGetResponse) GetKvs() []*KeyValue {
|
||||
if x != nil {
|
||||
return x.Kvs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_greptime_v1_meta_cluster_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_meta_cluster_proto_rawDesc = []byte{
|
||||
0x0a, 0x1e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x1c, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0x5e, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6b,
|
||||
0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22,
|
||||
0x7a, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a,
|
||||
0x03, 0x6b, 0x76, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4b, 0x65,
|
||||
0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6b, 0x76, 0x73, 0x32, 0xa6, 0x01, 0x0a, 0x07,
|
||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x08, 0x42, 0x61, 0x74, 0x63, 0x68,
|
||||
0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x52, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f,
|
||||
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
|
||||
0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_greptime_v1_meta_cluster_proto_rawDescOnce sync.Once
|
||||
file_greptime_v1_meta_cluster_proto_rawDescData = file_greptime_v1_meta_cluster_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_greptime_v1_meta_cluster_proto_rawDescGZIP() []byte {
|
||||
file_greptime_v1_meta_cluster_proto_rawDescOnce.Do(func() {
|
||||
file_greptime_v1_meta_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_cluster_proto_rawDescData)
|
||||
})
|
||||
return file_greptime_v1_meta_cluster_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_greptime_v1_meta_cluster_proto_goTypes = []interface{}{
|
||||
(*BatchGetRequest)(nil), // 0: greptime.v1.meta.BatchGetRequest
|
||||
(*BatchGetResponse)(nil), // 1: greptime.v1.meta.BatchGetResponse
|
||||
(*RequestHeader)(nil), // 2: greptime.v1.meta.RequestHeader
|
||||
(*ResponseHeader)(nil), // 3: greptime.v1.meta.ResponseHeader
|
||||
(*KeyValue)(nil), // 4: greptime.v1.meta.KeyValue
|
||||
(*RangeRequest)(nil), // 5: greptime.v1.meta.RangeRequest
|
||||
(*RangeResponse)(nil), // 6: greptime.v1.meta.RangeResponse
|
||||
}
|
||||
var file_greptime_v1_meta_cluster_proto_depIdxs = []int32{
|
||||
2, // 0: greptime.v1.meta.BatchGetRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
3, // 1: greptime.v1.meta.BatchGetResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
4, // 2: greptime.v1.meta.BatchGetResponse.kvs:type_name -> greptime.v1.meta.KeyValue
|
||||
0, // 3: greptime.v1.meta.Cluster.BatchGet:input_type -> greptime.v1.meta.BatchGetRequest
|
||||
5, // 4: greptime.v1.meta.Cluster.Range:input_type -> greptime.v1.meta.RangeRequest
|
||||
1, // 5: greptime.v1.meta.Cluster.BatchGet:output_type -> greptime.v1.meta.BatchGetResponse
|
||||
6, // 6: greptime.v1.meta.Cluster.Range:output_type -> greptime.v1.meta.RangeResponse
|
||||
5, // [5:7] is the sub-list for method output_type
|
||||
3, // [3:5] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_cluster_proto_init() }
|
||||
func file_greptime_v1_meta_cluster_proto_init() {
|
||||
if File_greptime_v1_meta_cluster_proto != nil {
|
||||
return
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_init()
|
||||
file_greptime_v1_meta_store_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_greptime_v1_meta_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BatchGetRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BatchGetResponse); 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_greptime_v1_meta_cluster_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_greptime_v1_meta_cluster_proto_goTypes,
|
||||
DependencyIndexes: file_greptime_v1_meta_cluster_proto_depIdxs,
|
||||
MessageInfos: file_greptime_v1_meta_cluster_proto_msgTypes,
|
||||
}.Build()
|
||||
File_greptime_v1_meta_cluster_proto = out.File
|
||||
file_greptime_v1_meta_cluster_proto_rawDesc = nil
|
||||
file_greptime_v1_meta_cluster_proto_goTypes = nil
|
||||
file_greptime_v1_meta_cluster_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.6
|
||||
// source: greptime/v1/meta/cluster.proto
|
||||
|
||||
package meta
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// ClusterClient is the client API for Cluster service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ClusterClient interface {
|
||||
// Batch get kvs by input keys from leader's in_memory kv store.
|
||||
BatchGet(ctx context.Context, in *BatchGetRequest, opts ...grpc.CallOption) (*BatchGetResponse, error)
|
||||
// Range get the kvs from leader's in_memory kv store.
|
||||
Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error)
|
||||
}
|
||||
|
||||
type clusterClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient {
|
||||
return &clusterClient{cc}
|
||||
}
|
||||
|
||||
func (c *clusterClient) BatchGet(ctx context.Context, in *BatchGetRequest, opts ...grpc.CallOption) (*BatchGetResponse, error) {
|
||||
out := new(BatchGetResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Cluster/BatchGet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *clusterClient) Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) {
|
||||
out := new(RangeResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Cluster/Range", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ClusterServer is the server API for Cluster service.
|
||||
// All implementations must embed UnimplementedClusterServer
|
||||
// for forward compatibility
|
||||
type ClusterServer interface {
|
||||
// Batch get kvs by input keys from leader's in_memory kv store.
|
||||
BatchGet(context.Context, *BatchGetRequest) (*BatchGetResponse, error)
|
||||
// Range get the kvs from leader's in_memory kv store.
|
||||
Range(context.Context, *RangeRequest) (*RangeResponse, error)
|
||||
mustEmbedUnimplementedClusterServer()
|
||||
}
|
||||
|
||||
// UnimplementedClusterServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedClusterServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedClusterServer) BatchGet(context.Context, *BatchGetRequest) (*BatchGetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BatchGet not implemented")
|
||||
}
|
||||
func (UnimplementedClusterServer) Range(context.Context, *RangeRequest) (*RangeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Range not implemented")
|
||||
}
|
||||
func (UnimplementedClusterServer) mustEmbedUnimplementedClusterServer() {}
|
||||
|
||||
// UnsafeClusterServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ClusterServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeClusterServer interface {
|
||||
mustEmbedUnimplementedClusterServer()
|
||||
}
|
||||
|
||||
func RegisterClusterServer(s grpc.ServiceRegistrar, srv ClusterServer) {
|
||||
s.RegisterService(&Cluster_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Cluster_BatchGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BatchGetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ClusterServer).BatchGet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Cluster/BatchGet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ClusterServer).BatchGet(ctx, req.(*BatchGetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cluster_Range_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RangeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ClusterServer).Range(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Cluster/Range",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ClusterServer).Range(ctx, req.(*RangeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Cluster_ServiceDesc is the grpc.ServiceDesc for Cluster service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Cluster_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "greptime.v1.meta.Cluster",
|
||||
HandlerType: (*ClusterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "BatchGet",
|
||||
Handler: _Cluster_BatchGet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Range",
|
||||
Handler: _Cluster_Range_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "greptime/v1/meta/cluster.proto",
|
||||
}
|
||||
@@ -0,0 +1,632 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.6
|
||||
// source: greptime/v1/meta/common.proto
|
||||
|
||||
package meta
|
||||
|
||||
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 RequestHeader struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ProtocolVersion uint64 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
|
||||
// cluster_id is the ID of the cluster which be sent to.
|
||||
ClusterId uint64 `protobuf:"varint,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
|
||||
// member_id is the ID of the sender server.
|
||||
MemberId uint64 `protobuf:"varint,3,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RequestHeader) Reset() {
|
||||
*x = RequestHeader{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_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_greptime_v1_meta_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_greptime_v1_meta_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *RequestHeader) GetProtocolVersion() uint64 {
|
||||
if x != nil {
|
||||
return x.ProtocolVersion
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RequestHeader) GetClusterId() uint64 {
|
||||
if x != nil {
|
||||
return x.ClusterId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RequestHeader) GetMemberId() uint64 {
|
||||
if x != nil {
|
||||
return x.MemberId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ResponseHeader struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ProtocolVersion uint64 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
|
||||
// cluster_id is the ID of the cluster which sent the response.
|
||||
ClusterId uint64 `protobuf:"varint,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
|
||||
Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ResponseHeader) Reset() {
|
||||
*x = ResponseHeader{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_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_greptime_v1_meta_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_greptime_v1_meta_common_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ResponseHeader) GetProtocolVersion() uint64 {
|
||||
if x != nil {
|
||||
return x.ProtocolVersion
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Error) Reset() {
|
||||
*x = Error{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_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_greptime_v1_meta_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_greptime_v1_meta_common_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Error) GetCode() int32 {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Error) GetErrMsg() string {
|
||||
if x != nil {
|
||||
return x.ErrMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Peer struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Peer) Reset() {
|
||||
*x = Peer{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Peer) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Peer) ProtoMessage() {}
|
||||
|
||||
func (x *Peer) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[3]
|
||||
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 Peer.ProtoReflect.Descriptor instead.
|
||||
func (*Peer) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Peer) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Peer) GetAddr() string {
|
||||
if x != nil {
|
||||
return x.Addr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TableName struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"`
|
||||
SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"`
|
||||
TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TableName) Reset() {
|
||||
*x = TableName{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TableName) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TableName) ProtoMessage() {}
|
||||
|
||||
func (x *TableName) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[4]
|
||||
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 TableName.ProtoReflect.Descriptor instead.
|
||||
func (*TableName) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *TableName) GetCatalogName() string {
|
||||
if x != nil {
|
||||
return x.CatalogName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TableName) GetSchemaName() string {
|
||||
if x != nil {
|
||||
return x.SchemaName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TableName) GetTableName() string {
|
||||
if x != nil {
|
||||
return x.TableName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TimeInterval struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The unix timestamp in millis of the start of this period.
|
||||
StartTimestampMillis uint64 `protobuf:"varint,1,opt,name=start_timestamp_millis,json=startTimestampMillis,proto3" json:"start_timestamp_millis,omitempty"`
|
||||
// The unix timestamp in millis of the end of this period.
|
||||
EndTimestampMillis uint64 `protobuf:"varint,2,opt,name=end_timestamp_millis,json=endTimestampMillis,proto3" json:"end_timestamp_millis,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TimeInterval) Reset() {
|
||||
*x = TimeInterval{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TimeInterval) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TimeInterval) ProtoMessage() {}
|
||||
|
||||
func (x *TimeInterval) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[5]
|
||||
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 TimeInterval.ProtoReflect.Descriptor instead.
|
||||
func (*TimeInterval) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *TimeInterval) GetStartTimestampMillis() uint64 {
|
||||
if x != nil {
|
||||
return x.StartTimestampMillis
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TimeInterval) GetEndTimestampMillis() uint64 {
|
||||
if x != nil {
|
||||
return x.EndTimestampMillis
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type KeyValue struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// key is the key in bytes. An empty key is not allowed.
|
||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
// value is the value held by the key, in bytes.
|
||||
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *KeyValue) Reset() {
|
||||
*x = KeyValue{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *KeyValue) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*KeyValue) ProtoMessage() {}
|
||||
|
||||
func (x *KeyValue) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_common_proto_msgTypes[6]
|
||||
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 KeyValue.ProtoReflect.Descriptor instead.
|
||||
func (*KeyValue) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *KeyValue) GetKey() []byte {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *KeyValue) GetValue() []byte {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_greptime_v1_meta_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_meta_common_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x22, 0x76, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09,
|
||||
0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05,
|
||||
0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2a, 0x0a, 0x04, 0x50,
|
||||
0x65, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x22, 0x6e, 0x0a, 0x09, 0x54, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61,
|
||||
0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d,
|
||||
0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63,
|
||||
0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x76, 0x0a, 0x0c, 0x54, 0x69, 0x6d, 0x65, 0x49,
|
||||
0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x74, 0x61, 0x72, 0x74,
|
||||
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x30, 0x0a,
|
||||
0x14, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d,
|
||||
0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x65, 0x6e, 0x64,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x22,
|
||||
0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
|
||||
0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_greptime_v1_meta_common_proto_rawDescOnce sync.Once
|
||||
file_greptime_v1_meta_common_proto_rawDescData = file_greptime_v1_meta_common_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_greptime_v1_meta_common_proto_rawDescGZIP() []byte {
|
||||
file_greptime_v1_meta_common_proto_rawDescOnce.Do(func() {
|
||||
file_greptime_v1_meta_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_common_proto_rawDescData)
|
||||
})
|
||||
return file_greptime_v1_meta_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_greptime_v1_meta_common_proto_goTypes = []interface{}{
|
||||
(*RequestHeader)(nil), // 0: greptime.v1.meta.RequestHeader
|
||||
(*ResponseHeader)(nil), // 1: greptime.v1.meta.ResponseHeader
|
||||
(*Error)(nil), // 2: greptime.v1.meta.Error
|
||||
(*Peer)(nil), // 3: greptime.v1.meta.Peer
|
||||
(*TableName)(nil), // 4: greptime.v1.meta.TableName
|
||||
(*TimeInterval)(nil), // 5: greptime.v1.meta.TimeInterval
|
||||
(*KeyValue)(nil), // 6: greptime.v1.meta.KeyValue
|
||||
}
|
||||
var file_greptime_v1_meta_common_proto_depIdxs = []int32{
|
||||
2, // 0: greptime.v1.meta.ResponseHeader.error:type_name -> greptime.v1.meta.Error
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_common_proto_init() }
|
||||
func file_greptime_v1_meta_common_proto_init() {
|
||||
if File_greptime_v1_meta_common_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_greptime_v1_meta_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_greptime_v1_meta_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_greptime_v1_meta_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
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Peer); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TableName); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TimeInterval); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*KeyValue); 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_greptime_v1_meta_common_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_greptime_v1_meta_common_proto_goTypes,
|
||||
DependencyIndexes: file_greptime_v1_meta_common_proto_depIdxs,
|
||||
MessageInfos: file_greptime_v1_meta_common_proto_msgTypes,
|
||||
}.Build()
|
||||
File_greptime_v1_meta_common_proto = out.File
|
||||
file_greptime_v1_meta_common_proto_rawDesc = nil
|
||||
file_greptime_v1_meta_common_proto_goTypes = nil
|
||||
file_greptime_v1_meta_common_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,851 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.6
|
||||
// source: greptime/v1/meta/heartbeat.proto
|
||||
|
||||
package meta
|
||||
|
||||
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 HeartbeatRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
// Self peer
|
||||
Peer *Peer `protobuf:"bytes,2,opt,name=peer,proto3" json:"peer,omitempty"`
|
||||
// Leader node
|
||||
IsLeader bool `protobuf:"varint,3,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"`
|
||||
// Actually reported time interval
|
||||
ReportInterval *TimeInterval `protobuf:"bytes,4,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"`
|
||||
// Node stat
|
||||
NodeStat *NodeStat `protobuf:"bytes,5,opt,name=node_stat,json=nodeStat,proto3" json:"node_stat,omitempty"`
|
||||
// Region stats on this node
|
||||
RegionStats []*RegionStat `protobuf:"bytes,6,rep,name=region_stats,json=regionStats,proto3" json:"region_stats,omitempty"`
|
||||
// Follower nodes and stats, empty on follower nodes
|
||||
ReplicaStats []*ReplicaStat `protobuf:"bytes,7,rep,name=replica_stats,json=replicaStats,proto3" json:"replica_stats,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) Reset() {
|
||||
*x = HeartbeatRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HeartbeatRequest) ProtoMessage() {}
|
||||
|
||||
func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_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 HeartbeatRequest.ProtoReflect.Descriptor instead.
|
||||
func (*HeartbeatRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) GetPeer() *Peer {
|
||||
if x != nil {
|
||||
return x.Peer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) GetIsLeader() bool {
|
||||
if x != nil {
|
||||
return x.IsLeader
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) GetReportInterval() *TimeInterval {
|
||||
if x != nil {
|
||||
return x.ReportInterval
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) GetNodeStat() *NodeStat {
|
||||
if x != nil {
|
||||
return x.NodeStat
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) GetRegionStats() []*RegionStat {
|
||||
if x != nil {
|
||||
return x.RegionStats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HeartbeatRequest) GetReplicaStats() []*ReplicaStat {
|
||||
if x != nil {
|
||||
return x.ReplicaStats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type NodeStat struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The read capacity units during this period
|
||||
Rcus int64 `protobuf:"varint,1,opt,name=rcus,proto3" json:"rcus,omitempty"`
|
||||
// The write capacity units during this period
|
||||
Wcus int64 `protobuf:"varint,2,opt,name=wcus,proto3" json:"wcus,omitempty"`
|
||||
// How many tables on this node
|
||||
TableNum int64 `protobuf:"varint,3,opt,name=table_num,json=tableNum,proto3" json:"table_num,omitempty"`
|
||||
// How many regions on this node
|
||||
RegionNum int64 `protobuf:"varint,4,opt,name=region_num,json=regionNum,proto3" json:"region_num,omitempty"`
|
||||
CpuUsage float64 `protobuf:"fixed64,5,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"`
|
||||
Load float64 `protobuf:"fixed64,6,opt,name=load,proto3" json:"load,omitempty"`
|
||||
// Read disk IO on this node
|
||||
ReadIoRate float64 `protobuf:"fixed64,7,opt,name=read_io_rate,json=readIoRate,proto3" json:"read_io_rate,omitempty"`
|
||||
// Write disk IO on this node
|
||||
WriteIoRate float64 `protobuf:"fixed64,8,opt,name=write_io_rate,json=writeIoRate,proto3" json:"write_io_rate,omitempty"`
|
||||
// Others
|
||||
Attrs map[string]string `protobuf:"bytes,100,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *NodeStat) Reset() {
|
||||
*x = NodeStat{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NodeStat) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NodeStat) ProtoMessage() {}
|
||||
|
||||
func (x *NodeStat) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_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 NodeStat.ProtoReflect.Descriptor instead.
|
||||
func (*NodeStat) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetRcus() int64 {
|
||||
if x != nil {
|
||||
return x.Rcus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetWcus() int64 {
|
||||
if x != nil {
|
||||
return x.Wcus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetTableNum() int64 {
|
||||
if x != nil {
|
||||
return x.TableNum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetRegionNum() int64 {
|
||||
if x != nil {
|
||||
return x.RegionNum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetCpuUsage() float64 {
|
||||
if x != nil {
|
||||
return x.CpuUsage
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetLoad() float64 {
|
||||
if x != nil {
|
||||
return x.Load
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetReadIoRate() float64 {
|
||||
if x != nil {
|
||||
return x.ReadIoRate
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetWriteIoRate() float64 {
|
||||
if x != nil {
|
||||
return x.WriteIoRate
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeStat) GetAttrs() map[string]string {
|
||||
if x != nil {
|
||||
return x.Attrs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RegionStat struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionId uint64 `protobuf:"varint,1,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
|
||||
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
|
||||
// The read capacity units during this period
|
||||
Rcus int64 `protobuf:"varint,3,opt,name=rcus,proto3" json:"rcus,omitempty"`
|
||||
// The write capacity units during this period
|
||||
Wcus int64 `protobuf:"varint,4,opt,name=wcus,proto3" json:"wcus,omitempty"`
|
||||
// Approximate bytes of this region
|
||||
ApproximateBytes int64 `protobuf:"varint,5,opt,name=approximate_bytes,json=approximateBytes,proto3" json:"approximate_bytes,omitempty"`
|
||||
// Approximate number of rows in this region
|
||||
ApproximateRows int64 `protobuf:"varint,6,opt,name=approximate_rows,json=approximateRows,proto3" json:"approximate_rows,omitempty"`
|
||||
// Others
|
||||
Attrs map[string]string `protobuf:"bytes,100,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *RegionStat) Reset() {
|
||||
*x = RegionStat{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RegionStat) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegionStat) ProtoMessage() {}
|
||||
|
||||
func (x *RegionStat) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_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 RegionStat.ProtoReflect.Descriptor instead.
|
||||
func (*RegionStat) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *RegionStat) GetRegionId() uint64 {
|
||||
if x != nil {
|
||||
return x.RegionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RegionStat) GetTableName() *TableName {
|
||||
if x != nil {
|
||||
return x.TableName
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RegionStat) GetRcus() int64 {
|
||||
if x != nil {
|
||||
return x.Rcus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RegionStat) GetWcus() int64 {
|
||||
if x != nil {
|
||||
return x.Wcus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RegionStat) GetApproximateBytes() int64 {
|
||||
if x != nil {
|
||||
return x.ApproximateBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RegionStat) GetApproximateRows() int64 {
|
||||
if x != nil {
|
||||
return x.ApproximateRows
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RegionStat) GetAttrs() map[string]string {
|
||||
if x != nil {
|
||||
return x.Attrs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ReplicaStat struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Peer *Peer `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
|
||||
InSync bool `protobuf:"varint,2,opt,name=in_sync,json=inSync,proto3" json:"in_sync,omitempty"`
|
||||
IsLearner bool `protobuf:"varint,3,opt,name=is_learner,json=isLearner,proto3" json:"is_learner,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReplicaStat) Reset() {
|
||||
*x = ReplicaStat{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReplicaStat) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReplicaStat) ProtoMessage() {}
|
||||
|
||||
func (x *ReplicaStat) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
|
||||
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 ReplicaStat.ProtoReflect.Descriptor instead.
|
||||
func (*ReplicaStat) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ReplicaStat) GetPeer() *Peer {
|
||||
if x != nil {
|
||||
return x.Peer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ReplicaStat) GetInSync() bool {
|
||||
if x != nil {
|
||||
return x.InSync
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ReplicaStat) GetIsLearner() bool {
|
||||
if x != nil {
|
||||
return x.IsLearner
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type HeartbeatResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Payload [][]byte `protobuf:"bytes,2,rep,name=payload,proto3" json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HeartbeatResponse) Reset() {
|
||||
*x = HeartbeatResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HeartbeatResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HeartbeatResponse) ProtoMessage() {}
|
||||
|
||||
func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
|
||||
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 HeartbeatResponse.ProtoReflect.Descriptor instead.
|
||||
func (*HeartbeatResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *HeartbeatResponse) GetHeader() *ResponseHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HeartbeatResponse) GetPayload() [][]byte {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AskLeaderRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AskLeaderRequest) Reset() {
|
||||
*x = AskLeaderRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AskLeaderRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AskLeaderRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AskLeaderRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
|
||||
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 AskLeaderRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AskLeaderRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *AskLeaderRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AskLeaderResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Leader *Peer `protobuf:"bytes,2,opt,name=leader,proto3" json:"leader,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AskLeaderResponse) Reset() {
|
||||
*x = AskLeaderResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AskLeaderResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AskLeaderResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AskLeaderResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
|
||||
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 AskLeaderResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AskLeaderResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *AskLeaderResponse) GetHeader() *ResponseHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AskLeaderResponse) GetLeader() *Peer {
|
||||
if x != nil {
|
||||
return x.Leader
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_greptime_v1_meta_heartbeat_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{
|
||||
0x0a, 0x20, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x03, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x12, 0x2a, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x1b, 0x0a,
|
||||
0x09, 0x69, 0x73, 0x5f, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x08, 0x69, 0x73, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0f, 0x72, 0x65,
|
||||
0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72,
|
||||
0x76, 0x61, 0x6c, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72,
|
||||
0x76, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74,
|
||||
0x61, 0x74, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x3f, 0x0a, 0x0c,
|
||||
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
|
||||
0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x42, 0x0a,
|
||||
0x0d, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x07,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53,
|
||||
0x74, 0x61, 0x74, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x74, 0x61, 0x74,
|
||||
0x73, 0x22, 0xdc, 0x02, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x72, 0x63, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x63,
|
||||
0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x63, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x04, 0x77, 0x63, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f,
|
||||
0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x4e, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75,
|
||||
0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e,
|
||||
0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6f, 0x5f, 0x72,
|
||||
0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x49,
|
||||
0x6f, 0x52, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x69,
|
||||
0x6f, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x77, 0x72,
|
||||
0x69, 0x74, 0x65, 0x49, 0x6f, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x74, 0x74,
|
||||
0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x74, 0x61, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
||||
0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
||||
0x22, 0xde, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x0a,
|
||||
0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x63, 0x75, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x63, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x77, 0x63, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x77, 0x63, 0x75, 0x73,
|
||||
0x12, 0x2b, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x5f,
|
||||
0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x61, 0x70, 0x70,
|
||||
0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a,
|
||||
0x10, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x77,
|
||||
0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69,
|
||||
0x6d, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x3d, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72,
|
||||
0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x53, 0x74, 0x61, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||
0x01, 0x22, 0x71, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x74, 0x61, 0x74,
|
||||
0x12, 0x2a, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
|
||||
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07,
|
||||
0x69, 0x6e, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69,
|
||||
0x6e, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x6c, 0x65, 0x61, 0x72,
|
||||
0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x4c, 0x65, 0x61,
|
||||
0x72, 0x6e, 0x65, 0x72, 0x22, 0x67, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x4b, 0x0a,
|
||||
0x10, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x7d, 0x0a, 0x11, 0x41, 0x73,
|
||||
0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65,
|
||||
0x72, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x32, 0xbf, 0x01, 0x0a, 0x09, 0x48, 0x65,
|
||||
0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74,
|
||||
0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72,
|
||||
0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28,
|
||||
0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_greptime_v1_meta_heartbeat_proto_rawDescOnce sync.Once
|
||||
file_greptime_v1_meta_heartbeat_proto_rawDescData = file_greptime_v1_meta_heartbeat_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_greptime_v1_meta_heartbeat_proto_rawDescGZIP() []byte {
|
||||
file_greptime_v1_meta_heartbeat_proto_rawDescOnce.Do(func() {
|
||||
file_greptime_v1_meta_heartbeat_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_heartbeat_proto_rawDescData)
|
||||
})
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{
|
||||
(*HeartbeatRequest)(nil), // 0: greptime.v1.meta.HeartbeatRequest
|
||||
(*NodeStat)(nil), // 1: greptime.v1.meta.NodeStat
|
||||
(*RegionStat)(nil), // 2: greptime.v1.meta.RegionStat
|
||||
(*ReplicaStat)(nil), // 3: greptime.v1.meta.ReplicaStat
|
||||
(*HeartbeatResponse)(nil), // 4: greptime.v1.meta.HeartbeatResponse
|
||||
(*AskLeaderRequest)(nil), // 5: greptime.v1.meta.AskLeaderRequest
|
||||
(*AskLeaderResponse)(nil), // 6: greptime.v1.meta.AskLeaderResponse
|
||||
nil, // 7: greptime.v1.meta.NodeStat.AttrsEntry
|
||||
nil, // 8: greptime.v1.meta.RegionStat.AttrsEntry
|
||||
(*RequestHeader)(nil), // 9: greptime.v1.meta.RequestHeader
|
||||
(*Peer)(nil), // 10: greptime.v1.meta.Peer
|
||||
(*TimeInterval)(nil), // 11: greptime.v1.meta.TimeInterval
|
||||
(*TableName)(nil), // 12: greptime.v1.meta.TableName
|
||||
(*ResponseHeader)(nil), // 13: greptime.v1.meta.ResponseHeader
|
||||
}
|
||||
var file_greptime_v1_meta_heartbeat_proto_depIdxs = []int32{
|
||||
9, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
10, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer
|
||||
11, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval
|
||||
1, // 3: greptime.v1.meta.HeartbeatRequest.node_stat:type_name -> greptime.v1.meta.NodeStat
|
||||
2, // 4: greptime.v1.meta.HeartbeatRequest.region_stats:type_name -> greptime.v1.meta.RegionStat
|
||||
3, // 5: greptime.v1.meta.HeartbeatRequest.replica_stats:type_name -> greptime.v1.meta.ReplicaStat
|
||||
7, // 6: greptime.v1.meta.NodeStat.attrs:type_name -> greptime.v1.meta.NodeStat.AttrsEntry
|
||||
12, // 7: greptime.v1.meta.RegionStat.table_name:type_name -> greptime.v1.meta.TableName
|
||||
8, // 8: greptime.v1.meta.RegionStat.attrs:type_name -> greptime.v1.meta.RegionStat.AttrsEntry
|
||||
10, // 9: greptime.v1.meta.ReplicaStat.peer:type_name -> greptime.v1.meta.Peer
|
||||
13, // 10: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
9, // 11: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
13, // 12: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
10, // 13: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer
|
||||
0, // 14: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest
|
||||
5, // 15: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest
|
||||
4, // 16: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse
|
||||
6, // 17: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse
|
||||
16, // [16:18] is the sub-list for method output_type
|
||||
14, // [14:16] is the sub-list for method input_type
|
||||
14, // [14:14] is the sub-list for extension type_name
|
||||
14, // [14:14] is the sub-list for extension extendee
|
||||
0, // [0:14] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_heartbeat_proto_init() }
|
||||
func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
if File_greptime_v1_meta_heartbeat_proto != nil {
|
||||
return
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HeartbeatRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NodeStat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RegionStat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ReplicaStat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HeartbeatResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AskLeaderRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AskLeaderResponse); 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_greptime_v1_meta_heartbeat_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_greptime_v1_meta_heartbeat_proto_goTypes,
|
||||
DependencyIndexes: file_greptime_v1_meta_heartbeat_proto_depIdxs,
|
||||
MessageInfos: file_greptime_v1_meta_heartbeat_proto_msgTypes,
|
||||
}.Build()
|
||||
File_greptime_v1_meta_heartbeat_proto = out.File
|
||||
file_greptime_v1_meta_heartbeat_proto_rawDesc = nil
|
||||
file_greptime_v1_meta_heartbeat_proto_goTypes = nil
|
||||
file_greptime_v1_meta_heartbeat_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.6
|
||||
// source: greptime/v1/meta/heartbeat.proto
|
||||
|
||||
package meta
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// HeartbeatClient is the client API for Heartbeat service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type HeartbeatClient interface {
|
||||
// Heartbeat, there may be many contents of the heartbeat, such as:
|
||||
// 1. Metadata to be registered to meta server and discoverable by other nodes.
|
||||
// 2. Some performance metrics, such as Load, CPU usage, etc.
|
||||
// 3. The number of computing tasks being executed.
|
||||
Heartbeat(ctx context.Context, opts ...grpc.CallOption) (Heartbeat_HeartbeatClient, error)
|
||||
// Ask leader's endpoint.
|
||||
AskLeader(ctx context.Context, in *AskLeaderRequest, opts ...grpc.CallOption) (*AskLeaderResponse, error)
|
||||
}
|
||||
|
||||
type heartbeatClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHeartbeatClient(cc grpc.ClientConnInterface) HeartbeatClient {
|
||||
return &heartbeatClient{cc}
|
||||
}
|
||||
|
||||
func (c *heartbeatClient) Heartbeat(ctx context.Context, opts ...grpc.CallOption) (Heartbeat_HeartbeatClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Heartbeat_ServiceDesc.Streams[0], "/greptime.v1.meta.Heartbeat/Heartbeat", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &heartbeatHeartbeatClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Heartbeat_HeartbeatClient interface {
|
||||
Send(*HeartbeatRequest) error
|
||||
Recv() (*HeartbeatResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type heartbeatHeartbeatClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *heartbeatHeartbeatClient) Send(m *HeartbeatRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *heartbeatHeartbeatClient) Recv() (*HeartbeatResponse, error) {
|
||||
m := new(HeartbeatResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *heartbeatClient) AskLeader(ctx context.Context, in *AskLeaderRequest, opts ...grpc.CallOption) (*AskLeaderResponse, error) {
|
||||
out := new(AskLeaderResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Heartbeat/AskLeader", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HeartbeatServer is the server API for Heartbeat service.
|
||||
// All implementations must embed UnimplementedHeartbeatServer
|
||||
// for forward compatibility
|
||||
type HeartbeatServer interface {
|
||||
// Heartbeat, there may be many contents of the heartbeat, such as:
|
||||
// 1. Metadata to be registered to meta server and discoverable by other nodes.
|
||||
// 2. Some performance metrics, such as Load, CPU usage, etc.
|
||||
// 3. The number of computing tasks being executed.
|
||||
Heartbeat(Heartbeat_HeartbeatServer) error
|
||||
// Ask leader's endpoint.
|
||||
AskLeader(context.Context, *AskLeaderRequest) (*AskLeaderResponse, error)
|
||||
mustEmbedUnimplementedHeartbeatServer()
|
||||
}
|
||||
|
||||
// UnimplementedHeartbeatServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedHeartbeatServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedHeartbeatServer) Heartbeat(Heartbeat_HeartbeatServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Heartbeat not implemented")
|
||||
}
|
||||
func (UnimplementedHeartbeatServer) AskLeader(context.Context, *AskLeaderRequest) (*AskLeaderResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AskLeader not implemented")
|
||||
}
|
||||
func (UnimplementedHeartbeatServer) mustEmbedUnimplementedHeartbeatServer() {}
|
||||
|
||||
// UnsafeHeartbeatServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to HeartbeatServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeHeartbeatServer interface {
|
||||
mustEmbedUnimplementedHeartbeatServer()
|
||||
}
|
||||
|
||||
func RegisterHeartbeatServer(s grpc.ServiceRegistrar, srv HeartbeatServer) {
|
||||
s.RegisterService(&Heartbeat_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Heartbeat_Heartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(HeartbeatServer).Heartbeat(&heartbeatHeartbeatServer{stream})
|
||||
}
|
||||
|
||||
type Heartbeat_HeartbeatServer interface {
|
||||
Send(*HeartbeatResponse) error
|
||||
Recv() (*HeartbeatRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type heartbeatHeartbeatServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *heartbeatHeartbeatServer) Send(m *HeartbeatResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *heartbeatHeartbeatServer) Recv() (*HeartbeatRequest, error) {
|
||||
m := new(HeartbeatRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _Heartbeat_AskLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AskLeaderRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HeartbeatServer).AskLeader(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Heartbeat/AskLeader",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HeartbeatServer).AskLeader(ctx, req.(*AskLeaderRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Heartbeat_ServiceDesc is the grpc.ServiceDesc for Heartbeat service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Heartbeat_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "greptime.v1.meta.Heartbeat",
|
||||
HandlerType: (*HeartbeatServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AskLeader",
|
||||
Handler: _Heartbeat_AskLeader_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Heartbeat",
|
||||
Handler: _Heartbeat_Heartbeat_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "greptime/v1/meta/heartbeat.proto",
|
||||
}
|
||||
@@ -0,0 +1,408 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.6
|
||||
// source: greptime/v1/meta/lock.proto
|
||||
|
||||
package meta
|
||||
|
||||
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 LockRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
// Name is the identifier for the distributed shared lock to be acquired.
|
||||
Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// If the expiration time is exceeded and currently holds the lock, the lock is
|
||||
// automatically released.
|
||||
ExpireSecs int64 `protobuf:"varint,3,opt,name=expire_secs,json=expireSecs,proto3" json:"expire_secs,omitempty"`
|
||||
}
|
||||
|
||||
func (x *LockRequest) Reset() {
|
||||
*x = LockRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_lock_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LockRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LockRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LockRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_lock_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 LockRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LockRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *LockRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *LockRequest) GetName() []byte {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *LockRequest) GetExpireSecs() int64 {
|
||||
if x != nil {
|
||||
return x.ExpireSecs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type LockResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
// Key will exist as long as lock is held by the caller.
|
||||
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (x *LockResponse) Reset() {
|
||||
*x = LockResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_lock_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LockResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LockResponse) ProtoMessage() {}
|
||||
|
||||
func (x *LockResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_lock_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 LockResponse.ProtoReflect.Descriptor instead.
|
||||
func (*LockResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *LockResponse) GetHeader() *ResponseHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *LockResponse) GetKey() []byte {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UnlockRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
// key is the lock ownership key granted by Lock.
|
||||
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UnlockRequest) Reset() {
|
||||
*x = UnlockRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_lock_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UnlockRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UnlockRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UnlockRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_lock_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 UnlockRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UnlockRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *UnlockRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UnlockRequest) GetKey() []byte {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UnlockResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UnlockResponse) Reset() {
|
||||
*x = UnlockResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_lock_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UnlockResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UnlockResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UnlockResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_lock_proto_msgTypes[3]
|
||||
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 UnlockResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UnlockResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *UnlockResponse) GetHeader() *ResponseHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_greptime_v1_meta_lock_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_meta_lock_proto_rawDesc = []byte{
|
||||
0x0a, 0x1b, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a,
|
||||
0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b,
|
||||
0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a,
|
||||
0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
|
||||
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06,
|
||||
0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78,
|
||||
0x70, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x53, 0x65, 0x63, 0x73, 0x22, 0x5a, 0x0a, 0x0c, 0x4c,
|
||||
0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72,
|
||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x5a, 0x0a, 0x0d, 0x55, 0x6e, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x22, 0x4a, 0x0a, 0x0e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x32,
|
||||
0x9a, 0x01, 0x0a, 0x04, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x45, 0x0a, 0x04, 0x4c, 0x6f, 0x63, 0x6b,
|
||||
0x12, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x4b, 0x0a, 0x06, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x55, 0x6e, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x55, 0x6e,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_greptime_v1_meta_lock_proto_rawDescOnce sync.Once
|
||||
file_greptime_v1_meta_lock_proto_rawDescData = file_greptime_v1_meta_lock_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_greptime_v1_meta_lock_proto_rawDescGZIP() []byte {
|
||||
file_greptime_v1_meta_lock_proto_rawDescOnce.Do(func() {
|
||||
file_greptime_v1_meta_lock_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_lock_proto_rawDescData)
|
||||
})
|
||||
return file_greptime_v1_meta_lock_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_lock_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_greptime_v1_meta_lock_proto_goTypes = []interface{}{
|
||||
(*LockRequest)(nil), // 0: greptime.v1.meta.LockRequest
|
||||
(*LockResponse)(nil), // 1: greptime.v1.meta.LockResponse
|
||||
(*UnlockRequest)(nil), // 2: greptime.v1.meta.UnlockRequest
|
||||
(*UnlockResponse)(nil), // 3: greptime.v1.meta.UnlockResponse
|
||||
(*RequestHeader)(nil), // 4: greptime.v1.meta.RequestHeader
|
||||
(*ResponseHeader)(nil), // 5: greptime.v1.meta.ResponseHeader
|
||||
}
|
||||
var file_greptime_v1_meta_lock_proto_depIdxs = []int32{
|
||||
4, // 0: greptime.v1.meta.LockRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
5, // 1: greptime.v1.meta.LockResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
4, // 2: greptime.v1.meta.UnlockRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
5, // 3: greptime.v1.meta.UnlockResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
0, // 4: greptime.v1.meta.Lock.Lock:input_type -> greptime.v1.meta.LockRequest
|
||||
2, // 5: greptime.v1.meta.Lock.Unlock:input_type -> greptime.v1.meta.UnlockRequest
|
||||
1, // 6: greptime.v1.meta.Lock.Lock:output_type -> greptime.v1.meta.LockResponse
|
||||
3, // 7: greptime.v1.meta.Lock.Unlock:output_type -> greptime.v1.meta.UnlockResponse
|
||||
6, // [6:8] is the sub-list for method output_type
|
||||
4, // [4:6] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_lock_proto_init() }
|
||||
func file_greptime_v1_meta_lock_proto_init() {
|
||||
if File_greptime_v1_meta_lock_proto != nil {
|
||||
return
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_greptime_v1_meta_lock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LockRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_lock_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LockResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_lock_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnlockRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_lock_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnlockResponse); 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_greptime_v1_meta_lock_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_greptime_v1_meta_lock_proto_goTypes,
|
||||
DependencyIndexes: file_greptime_v1_meta_lock_proto_depIdxs,
|
||||
MessageInfos: file_greptime_v1_meta_lock_proto_msgTypes,
|
||||
}.Build()
|
||||
File_greptime_v1_meta_lock_proto = out.File
|
||||
file_greptime_v1_meta_lock_proto_rawDesc = nil
|
||||
file_greptime_v1_meta_lock_proto_goTypes = nil
|
||||
file_greptime_v1_meta_lock_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.6
|
||||
// source: greptime/v1/meta/lock.proto
|
||||
|
||||
package meta
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// LockClient is the client API for Lock service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type LockClient interface {
|
||||
// Lock acquires a distributed shared lock on a given named lock. On success, it
|
||||
// will return a unique key that exists so long as the lock is held by the caller.
|
||||
Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error)
|
||||
// Unlock takes a key returned by Lock and releases the hold on lock.
|
||||
Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
|
||||
}
|
||||
|
||||
type lockClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewLockClient(cc grpc.ClientConnInterface) LockClient {
|
||||
return &lockClient{cc}
|
||||
}
|
||||
|
||||
func (c *lockClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) {
|
||||
out := new(LockResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Lock/Lock", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *lockClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
|
||||
out := new(UnlockResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Lock/Unlock", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// LockServer is the server API for Lock service.
|
||||
// All implementations must embed UnimplementedLockServer
|
||||
// for forward compatibility
|
||||
type LockServer interface {
|
||||
// Lock acquires a distributed shared lock on a given named lock. On success, it
|
||||
// will return a unique key that exists so long as the lock is held by the caller.
|
||||
Lock(context.Context, *LockRequest) (*LockResponse, error)
|
||||
// Unlock takes a key returned by Lock and releases the hold on lock.
|
||||
Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
|
||||
mustEmbedUnimplementedLockServer()
|
||||
}
|
||||
|
||||
// UnimplementedLockServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedLockServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedLockServer) Lock(context.Context, *LockRequest) (*LockResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented")
|
||||
}
|
||||
func (UnimplementedLockServer) Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented")
|
||||
}
|
||||
func (UnimplementedLockServer) mustEmbedUnimplementedLockServer() {}
|
||||
|
||||
// UnsafeLockServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to LockServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeLockServer interface {
|
||||
mustEmbedUnimplementedLockServer()
|
||||
}
|
||||
|
||||
func RegisterLockServer(s grpc.ServiceRegistrar, srv LockServer) {
|
||||
s.RegisterService(&Lock_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Lock_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LockRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(LockServer).Lock(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Lock/Lock",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(LockServer).Lock(ctx, req.(*LockRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Lock_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UnlockRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(LockServer).Unlock(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Lock/Unlock",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(LockServer).Unlock(ctx, req.(*UnlockRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Lock_ServiceDesc is the grpc.ServiceDesc for Lock service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Lock_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "greptime.v1.meta.Lock",
|
||||
HandlerType: (*LockServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Lock",
|
||||
Handler: _Lock_Lock_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Unlock",
|
||||
Handler: _Lock_Unlock_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "greptime/v1/meta/lock.proto",
|
||||
}
|
||||
@@ -0,0 +1,967 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.6
|
||||
// source: greptime/v1/meta/route.proto
|
||||
|
||||
package meta
|
||||
|
||||
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 CreateRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
|
||||
Partitions []*Partition `protobuf:"bytes,3,rep,name=partitions,proto3" json:"partitions,omitempty"`
|
||||
TableInfo []byte `protobuf:"bytes,4,opt,name=table_info,json=tableInfo,proto3" json:"table_info,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateRequest) Reset() {
|
||||
*x = CreateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_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 CreateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetTableName() *TableName {
|
||||
if x != nil {
|
||||
return x.TableName
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetPartitions() []*Partition {
|
||||
if x != nil {
|
||||
return x.Partitions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetTableInfo() []byte {
|
||||
if x != nil {
|
||||
return x.TableInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RouteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
TableNames []*TableName `protobuf:"bytes,2,rep,name=table_names,json=tableNames,proto3" json:"table_names,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RouteRequest) Reset() {
|
||||
*x = RouteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RouteRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RouteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RouteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_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 RouteRequest.ProtoReflect.Descriptor instead.
|
||||
func (*RouteRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *RouteRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RouteRequest) GetTableNames() []*TableName {
|
||||
if x != nil {
|
||||
return x.TableNames
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) Reset() {
|
||||
*x = DeleteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_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 DeleteRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) GetHeader() *RequestHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DeleteRequest) GetTableName() *TableName {
|
||||
if x != nil {
|
||||
return x.TableName
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RouteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`
|
||||
TableRoutes []*TableRoute `protobuf:"bytes,3,rep,name=table_routes,json=tableRoutes,proto3" json:"table_routes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RouteResponse) Reset() {
|
||||
*x = RouteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RouteResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RouteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RouteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
|
||||
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 RouteResponse.ProtoReflect.Descriptor instead.
|
||||
func (*RouteResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *RouteResponse) GetHeader() *ResponseHeader {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RouteResponse) GetPeers() []*Peer {
|
||||
if x != nil {
|
||||
return x.Peers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RouteResponse) GetTableRoutes() []*TableRoute {
|
||||
if x != nil {
|
||||
return x.TableRoutes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TableRoute struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`
|
||||
RegionRoutes []*RegionRoute `protobuf:"bytes,2,rep,name=region_routes,json=regionRoutes,proto3" json:"region_routes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TableRoute) Reset() {
|
||||
*x = TableRoute{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TableRoute) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TableRoute) ProtoMessage() {}
|
||||
|
||||
func (x *TableRoute) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
|
||||
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 TableRoute.ProtoReflect.Descriptor instead.
|
||||
func (*TableRoute) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *TableRoute) GetTable() *Table {
|
||||
if x != nil {
|
||||
return x.Table
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TableRoute) GetRegionRoutes() []*RegionRoute {
|
||||
if x != nil {
|
||||
return x.RegionRoutes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RegionRoute struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Region *Region `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"`
|
||||
// single leader node for write task
|
||||
LeaderPeerIndex uint64 `protobuf:"varint,2,opt,name=leader_peer_index,json=leaderPeerIndex,proto3" json:"leader_peer_index,omitempty"`
|
||||
// multiple follower nodes for read task
|
||||
FollowerPeerIndexes []uint64 `protobuf:"varint,3,rep,packed,name=follower_peer_indexes,json=followerPeerIndexes,proto3" json:"follower_peer_indexes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RegionRoute) Reset() {
|
||||
*x = RegionRoute{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RegionRoute) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RegionRoute) ProtoMessage() {}
|
||||
|
||||
func (x *RegionRoute) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
|
||||
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 RegionRoute.ProtoReflect.Descriptor instead.
|
||||
func (*RegionRoute) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *RegionRoute) GetRegion() *Region {
|
||||
if x != nil {
|
||||
return x.Region
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RegionRoute) GetLeaderPeerIndex() uint64 {
|
||||
if x != nil {
|
||||
return x.LeaderPeerIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RegionRoute) GetFollowerPeerIndexes() []uint64 {
|
||||
if x != nil {
|
||||
return x.FollowerPeerIndexes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Table struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
|
||||
TableSchema []byte `protobuf:"bytes,3,opt,name=table_schema,json=tableSchema,proto3" json:"table_schema,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Table) Reset() {
|
||||
*x = Table{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Table) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Table) ProtoMessage() {}
|
||||
|
||||
func (x *Table) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[6]
|
||||
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 Table.ProtoReflect.Descriptor instead.
|
||||
func (*Table) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *Table) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Table) GetTableName() *TableName {
|
||||
if x != nil {
|
||||
return x.TableName
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Table) GetTableSchema() []byte {
|
||||
if x != nil {
|
||||
return x.TableSchema
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Region struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// TODO(LFC): Maybe use message RegionNumber?
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Partition *Partition `protobuf:"bytes,3,opt,name=partition,proto3" json:"partition,omitempty"`
|
||||
Attrs map[string]string `protobuf:"bytes,100,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *Region) Reset() {
|
||||
*x = Region{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Region) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Region) ProtoMessage() {}
|
||||
|
||||
func (x *Region) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[7]
|
||||
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 Region.ProtoReflect.Descriptor instead.
|
||||
func (*Region) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *Region) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Region) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Region) GetPartition() *Partition {
|
||||
if x != nil {
|
||||
return x.Partition
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Region) GetAttrs() map[string]string {
|
||||
if x != nil {
|
||||
return x.Attrs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// PARTITION `region_name` VALUES LESS THAN (value_list)
|
||||
type Partition struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ColumnList [][]byte `protobuf:"bytes,1,rep,name=column_list,json=columnList,proto3" json:"column_list,omitempty"`
|
||||
ValueList [][]byte `protobuf:"bytes,2,rep,name=value_list,json=valueList,proto3" json:"value_list,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Partition) Reset() {
|
||||
*x = Partition{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Partition) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Partition) ProtoMessage() {}
|
||||
|
||||
func (x *Partition) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[8]
|
||||
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 Partition.ProtoReflect.Descriptor instead.
|
||||
func (*Partition) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *Partition) GetColumnList() [][]byte {
|
||||
if x != nil {
|
||||
return x.ColumnList
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Partition) GetValueList() [][]byte {
|
||||
if x != nil {
|
||||
return x.ValueList
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// This message is only for saving into store.
|
||||
type TableRouteValue struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
|
||||
TableRoute *TableRoute `protobuf:"bytes,2,opt,name=table_route,json=tableRoute,proto3" json:"table_route,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TableRouteValue) Reset() {
|
||||
*x = TableRouteValue{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TableRouteValue) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TableRouteValue) ProtoMessage() {}
|
||||
|
||||
func (x *TableRouteValue) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_route_proto_msgTypes[9]
|
||||
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 TableRouteValue.ProtoReflect.Descriptor instead.
|
||||
func (*TableRouteValue) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *TableRouteValue) GetPeers() []*Peer {
|
||||
if x != nil {
|
||||
return x.Peers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TableRouteValue) GetTableRoute() *TableRoute {
|
||||
if x != nil {
|
||||
return x.TableRoute
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_greptime_v1_meta_route_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_meta_route_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10,
|
||||
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0xe0, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61,
|
||||
0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66,
|
||||
0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0b,
|
||||
0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0a,
|
||||
0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06,
|
||||
0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x22, 0xb8, 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a,
|
||||
0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
|
||||
0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x74,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52,
|
||||
0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x0a,
|
||||
0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x67,
|
||||
0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52,
|
||||
0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x9f, 0x01,
|
||||
0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a,
|
||||
0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
|
||||
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x2a, 0x0a, 0x11, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x15, 0x66,
|
||||
0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66, 0x6f, 0x6c, 0x6c,
|
||||
0x6f, 0x77, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22,
|
||||
0x76, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
|
||||
0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63,
|
||||
0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x72,
|
||||
0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x39, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a,
|
||||
0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70,
|
||||
0x65, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x32, 0xf0, 0x01, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4c,
|
||||
0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x05,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61,
|
||||
0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_greptime_v1_meta_route_proto_rawDescOnce sync.Once
|
||||
file_greptime_v1_meta_route_proto_rawDescData = file_greptime_v1_meta_route_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_greptime_v1_meta_route_proto_rawDescGZIP() []byte {
|
||||
file_greptime_v1_meta_route_proto_rawDescOnce.Do(func() {
|
||||
file_greptime_v1_meta_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_route_proto_rawDescData)
|
||||
})
|
||||
return file_greptime_v1_meta_route_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_greptime_v1_meta_route_proto_goTypes = []interface{}{
|
||||
(*CreateRequest)(nil), // 0: greptime.v1.meta.CreateRequest
|
||||
(*RouteRequest)(nil), // 1: greptime.v1.meta.RouteRequest
|
||||
(*DeleteRequest)(nil), // 2: greptime.v1.meta.DeleteRequest
|
||||
(*RouteResponse)(nil), // 3: greptime.v1.meta.RouteResponse
|
||||
(*TableRoute)(nil), // 4: greptime.v1.meta.TableRoute
|
||||
(*RegionRoute)(nil), // 5: greptime.v1.meta.RegionRoute
|
||||
(*Table)(nil), // 6: greptime.v1.meta.Table
|
||||
(*Region)(nil), // 7: greptime.v1.meta.Region
|
||||
(*Partition)(nil), // 8: greptime.v1.meta.Partition
|
||||
(*TableRouteValue)(nil), // 9: greptime.v1.meta.TableRouteValue
|
||||
nil, // 10: greptime.v1.meta.Region.AttrsEntry
|
||||
(*RequestHeader)(nil), // 11: greptime.v1.meta.RequestHeader
|
||||
(*TableName)(nil), // 12: greptime.v1.meta.TableName
|
||||
(*ResponseHeader)(nil), // 13: greptime.v1.meta.ResponseHeader
|
||||
(*Peer)(nil), // 14: greptime.v1.meta.Peer
|
||||
}
|
||||
var file_greptime_v1_meta_route_proto_depIdxs = []int32{
|
||||
11, // 0: greptime.v1.meta.CreateRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
12, // 1: greptime.v1.meta.CreateRequest.table_name:type_name -> greptime.v1.meta.TableName
|
||||
8, // 2: greptime.v1.meta.CreateRequest.partitions:type_name -> greptime.v1.meta.Partition
|
||||
11, // 3: greptime.v1.meta.RouteRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
12, // 4: greptime.v1.meta.RouteRequest.table_names:type_name -> greptime.v1.meta.TableName
|
||||
11, // 5: greptime.v1.meta.DeleteRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
12, // 6: greptime.v1.meta.DeleteRequest.table_name:type_name -> greptime.v1.meta.TableName
|
||||
13, // 7: greptime.v1.meta.RouteResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
14, // 8: greptime.v1.meta.RouteResponse.peers:type_name -> greptime.v1.meta.Peer
|
||||
4, // 9: greptime.v1.meta.RouteResponse.table_routes:type_name -> greptime.v1.meta.TableRoute
|
||||
6, // 10: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table
|
||||
5, // 11: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute
|
||||
7, // 12: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region
|
||||
12, // 13: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName
|
||||
8, // 14: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition
|
||||
10, // 15: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry
|
||||
14, // 16: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer
|
||||
4, // 17: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute
|
||||
0, // 18: greptime.v1.meta.Router.Create:input_type -> greptime.v1.meta.CreateRequest
|
||||
1, // 19: greptime.v1.meta.Router.Route:input_type -> greptime.v1.meta.RouteRequest
|
||||
2, // 20: greptime.v1.meta.Router.Delete:input_type -> greptime.v1.meta.DeleteRequest
|
||||
3, // 21: greptime.v1.meta.Router.Create:output_type -> greptime.v1.meta.RouteResponse
|
||||
3, // 22: greptime.v1.meta.Router.Route:output_type -> greptime.v1.meta.RouteResponse
|
||||
3, // 23: greptime.v1.meta.Router.Delete:output_type -> greptime.v1.meta.RouteResponse
|
||||
21, // [21:24] is the sub-list for method output_type
|
||||
18, // [18:21] is the sub-list for method input_type
|
||||
18, // [18:18] is the sub-list for extension type_name
|
||||
18, // [18:18] is the sub-list for extension extendee
|
||||
0, // [0:18] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_route_proto_init() }
|
||||
func file_greptime_v1_meta_route_proto_init() {
|
||||
if File_greptime_v1_meta_route_proto != nil {
|
||||
return
|
||||
}
|
||||
file_greptime_v1_meta_common_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_greptime_v1_meta_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RouteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RouteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TableRoute); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RegionRoute); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Table); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Region); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Partition); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_route_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TableRouteValue); 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_greptime_v1_meta_route_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_greptime_v1_meta_route_proto_goTypes,
|
||||
DependencyIndexes: file_greptime_v1_meta_route_proto_depIdxs,
|
||||
MessageInfos: file_greptime_v1_meta_route_proto_msgTypes,
|
||||
}.Build()
|
||||
File_greptime_v1_meta_route_proto = out.File
|
||||
file_greptime_v1_meta_route_proto_rawDesc = nil
|
||||
file_greptime_v1_meta_route_proto_goTypes = nil
|
||||
file_greptime_v1_meta_route_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.6
|
||||
// source: greptime/v1/meta/route.proto
|
||||
|
||||
package meta
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// RouterClient is the client API for Router service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type RouterClient interface {
|
||||
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*RouteResponse, error)
|
||||
// Fetch routing information for tables. The smallest unit is the complete
|
||||
// routing information(all regions) of a table.
|
||||
//
|
||||
// ```text
|
||||
// table_1
|
||||
//
|
||||
// table_name
|
||||
// table_schema
|
||||
// regions
|
||||
// region_1
|
||||
// leader_peer
|
||||
// follower_peer_1, follower_peer_2
|
||||
// region_2
|
||||
// leader_peer
|
||||
// follower_peer_1, follower_peer_2, follower_peer_3
|
||||
// region_xxx
|
||||
//
|
||||
// table_2
|
||||
//
|
||||
// ...
|
||||
//
|
||||
// ```
|
||||
Route(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error)
|
||||
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*RouteResponse, error)
|
||||
}
|
||||
|
||||
type routerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient {
|
||||
return &routerClient{cc}
|
||||
}
|
||||
|
||||
func (c *routerClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*RouteResponse, error) {
|
||||
out := new(RouteResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Create", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) Route(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error) {
|
||||
out := new(RouteResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Route", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*RouteResponse, error) {
|
||||
out := new(RouteResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Delete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RouterServer is the server API for Router service.
|
||||
// All implementations must embed UnimplementedRouterServer
|
||||
// for forward compatibility
|
||||
type RouterServer interface {
|
||||
Create(context.Context, *CreateRequest) (*RouteResponse, error)
|
||||
// Fetch routing information for tables. The smallest unit is the complete
|
||||
// routing information(all regions) of a table.
|
||||
//
|
||||
// ```text
|
||||
// table_1
|
||||
//
|
||||
// table_name
|
||||
// table_schema
|
||||
// regions
|
||||
// region_1
|
||||
// leader_peer
|
||||
// follower_peer_1, follower_peer_2
|
||||
// region_2
|
||||
// leader_peer
|
||||
// follower_peer_1, follower_peer_2, follower_peer_3
|
||||
// region_xxx
|
||||
//
|
||||
// table_2
|
||||
//
|
||||
// ...
|
||||
//
|
||||
// ```
|
||||
Route(context.Context, *RouteRequest) (*RouteResponse, error)
|
||||
Delete(context.Context, *DeleteRequest) (*RouteResponse, error)
|
||||
mustEmbedUnimplementedRouterServer()
|
||||
}
|
||||
|
||||
// UnimplementedRouterServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRouterServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRouterServer) Create(context.Context, *CreateRequest) (*RouteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) Route(context.Context, *RouteRequest) (*RouteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Route not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) Delete(context.Context, *DeleteRequest) (*RouteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedRouterServer) mustEmbedUnimplementedRouterServer() {}
|
||||
|
||||
// UnsafeRouterServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RouterServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRouterServer interface {
|
||||
mustEmbedUnimplementedRouterServer()
|
||||
}
|
||||
|
||||
func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer) {
|
||||
s.RegisterService(&Router_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Router_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).Create(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Router/Create",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).Create(ctx, req.(*CreateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_Route_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RouteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).Route(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Router/Route",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).Route(ctx, req.(*RouteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).Delete(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Router/Delete",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).Delete(ctx, req.(*DeleteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Router_ServiceDesc is the grpc.ServiceDesc for Router service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Router_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "greptime.v1.meta.Router",
|
||||
HandlerType: (*RouterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _Router_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Route",
|
||||
Handler: _Router_Route_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _Router_Delete_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "greptime/v1/meta/route.proto",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,299 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.6
|
||||
// source: greptime/v1/meta/store.proto
|
||||
|
||||
package meta
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// StoreClient is the client API for Store service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type StoreClient interface {
|
||||
// Range gets the keys in the range from the key-value store.
|
||||
Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error)
|
||||
// Put puts the given key into the key-value store.
|
||||
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
|
||||
// BatchPut atomically puts the given keys into the key-value store.
|
||||
BatchPut(ctx context.Context, in *BatchPutRequest, opts ...grpc.CallOption) (*BatchPutResponse, error)
|
||||
// CompareAndPut atomically puts the value to the given updated
|
||||
// value if the current value == the expected value.
|
||||
CompareAndPut(ctx context.Context, in *CompareAndPutRequest, opts ...grpc.CallOption) (*CompareAndPutResponse, error)
|
||||
// DeleteRange deletes the given range from the key-value store.
|
||||
DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error)
|
||||
// MoveValue atomically renames the key to the given updated key.
|
||||
MoveValue(ctx context.Context, in *MoveValueRequest, opts ...grpc.CallOption) (*MoveValueResponse, error)
|
||||
}
|
||||
|
||||
type storeClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewStoreClient(cc grpc.ClientConnInterface) StoreClient {
|
||||
return &storeClient{cc}
|
||||
}
|
||||
|
||||
func (c *storeClient) Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) {
|
||||
out := new(RangeResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/Range", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
|
||||
out := new(PutResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/Put", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) BatchPut(ctx context.Context, in *BatchPutRequest, opts ...grpc.CallOption) (*BatchPutResponse, error) {
|
||||
out := new(BatchPutResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/BatchPut", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) CompareAndPut(ctx context.Context, in *CompareAndPutRequest, opts ...grpc.CallOption) (*CompareAndPutResponse, error) {
|
||||
out := new(CompareAndPutResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/CompareAndPut", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error) {
|
||||
out := new(DeleteRangeResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/DeleteRange", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *storeClient) MoveValue(ctx context.Context, in *MoveValueRequest, opts ...grpc.CallOption) (*MoveValueResponse, error) {
|
||||
out := new(MoveValueResponse)
|
||||
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/MoveValue", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// StoreServer is the server API for Store service.
|
||||
// All implementations must embed UnimplementedStoreServer
|
||||
// for forward compatibility
|
||||
type StoreServer interface {
|
||||
// Range gets the keys in the range from the key-value store.
|
||||
Range(context.Context, *RangeRequest) (*RangeResponse, error)
|
||||
// Put puts the given key into the key-value store.
|
||||
Put(context.Context, *PutRequest) (*PutResponse, error)
|
||||
// BatchPut atomically puts the given keys into the key-value store.
|
||||
BatchPut(context.Context, *BatchPutRequest) (*BatchPutResponse, error)
|
||||
// CompareAndPut atomically puts the value to the given updated
|
||||
// value if the current value == the expected value.
|
||||
CompareAndPut(context.Context, *CompareAndPutRequest) (*CompareAndPutResponse, error)
|
||||
// DeleteRange deletes the given range from the key-value store.
|
||||
DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error)
|
||||
// MoveValue atomically renames the key to the given updated key.
|
||||
MoveValue(context.Context, *MoveValueRequest) (*MoveValueResponse, error)
|
||||
mustEmbedUnimplementedStoreServer()
|
||||
}
|
||||
|
||||
// UnimplementedStoreServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedStoreServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedStoreServer) Range(context.Context, *RangeRequest) (*RangeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Range not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) Put(context.Context, *PutRequest) (*PutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Put not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) BatchPut(context.Context, *BatchPutRequest) (*BatchPutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BatchPut not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) CompareAndPut(context.Context, *CompareAndPutRequest) (*CompareAndPutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CompareAndPut not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteRange not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) MoveValue(context.Context, *MoveValueRequest) (*MoveValueResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MoveValue not implemented")
|
||||
}
|
||||
func (UnimplementedStoreServer) mustEmbedUnimplementedStoreServer() {}
|
||||
|
||||
// UnsafeStoreServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to StoreServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeStoreServer interface {
|
||||
mustEmbedUnimplementedStoreServer()
|
||||
}
|
||||
|
||||
func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer) {
|
||||
s.RegisterService(&Store_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Store_Range_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RangeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StoreServer).Range(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Store/Range",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StoreServer).Range(ctx, req.(*RangeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Store_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StoreServer).Put(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Store/Put",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StoreServer).Put(ctx, req.(*PutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Store_BatchPut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BatchPutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StoreServer).BatchPut(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Store/BatchPut",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StoreServer).BatchPut(ctx, req.(*BatchPutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Store_CompareAndPut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CompareAndPutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StoreServer).CompareAndPut(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Store/CompareAndPut",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StoreServer).CompareAndPut(ctx, req.(*CompareAndPutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Store_DeleteRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteRangeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StoreServer).DeleteRange(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Store/DeleteRange",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StoreServer).DeleteRange(ctx, req.(*DeleteRangeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Store_MoveValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MoveValueRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StoreServer).MoveValue(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/greptime.v1.meta.Store/MoveValue",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StoreServer).MoveValue(ctx, req.(*MoveValueRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Store_ServiceDesc is the grpc.ServiceDesc for Store service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Store_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "greptime.v1.meta.Store",
|
||||
HandlerType: (*StoreServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Range",
|
||||
Handler: _Store_Range_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Put",
|
||||
Handler: _Store_Put_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BatchPut",
|
||||
Handler: _Store_BatchPut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CompareAndPut",
|
||||
Handler: _Store_CompareAndPut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteRange",
|
||||
Handler: _Store_DeleteRange_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MoveValue",
|
||||
Handler: _Store_MoveValue_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "greptime/v1/meta/store.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user