feat: remove the move_value api (#111)

This commit is contained in:
JeremyHi
2023-10-23 10:20:57 +08:00
committed by GitHub
parent 365922c358
commit 1d7dc6f18b
9 changed files with 124 additions and 3642 deletions
+81 -256
View File
@@ -962,129 +962,6 @@ func (x *DeleteRangeResponse) GetPrevKvs() []*KeyValue {
return nil
}
type MoveValueRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// If from_key dose not exist, return the value of to_key (if it exists).
// If from_key exists, move the value of from_key to to_key (i.e. rename),
// and return the value.
FromKey []byte `protobuf:"bytes,2,opt,name=from_key,json=fromKey,proto3" json:"from_key,omitempty"`
ToKey []byte `protobuf:"bytes,3,opt,name=to_key,json=toKey,proto3" json:"to_key,omitempty"`
}
func (x *MoveValueRequest) Reset() {
*x = MoveValueRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_store_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MoveValueRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MoveValueRequest) ProtoMessage() {}
func (x *MoveValueRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_store_proto_msgTypes[14]
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 MoveValueRequest.ProtoReflect.Descriptor instead.
func (*MoveValueRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_store_proto_rawDescGZIP(), []int{14}
}
func (x *MoveValueRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *MoveValueRequest) GetFromKey() []byte {
if x != nil {
return x.FromKey
}
return nil
}
func (x *MoveValueRequest) GetToKey() []byte {
if x != nil {
return x.ToKey
}
return nil
}
type MoveValueResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// If from_key dose not exist, return the value of to_key (if it exists).
// If from_key exists, return the value of from_key.
Kv *KeyValue `protobuf:"bytes,2,opt,name=kv,proto3" json:"kv,omitempty"`
}
func (x *MoveValueResponse) Reset() {
*x = MoveValueResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_store_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MoveValueResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MoveValueResponse) ProtoMessage() {}
func (x *MoveValueResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_store_proto_msgTypes[15]
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 MoveValueResponse.ProtoReflect.Descriptor instead.
func (*MoveValueResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_store_proto_rawDescGZIP(), []int{15}
}
func (x *MoveValueResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *MoveValueResponse) GetKv() *KeyValue {
if x != nil {
return x.Kv
}
return nil
}
var File_greptime_v1_meta_store_proto protoreflect.FileDescriptor
var file_greptime_v1_meta_store_proto_rawDesc = []byte{
@@ -1215,65 +1092,44 @@ var file_greptime_v1_meta_store_proto_rawDesc = []byte{
0x65, 0x74, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6b, 0x76, 0x73,
0x18, 0x03, 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, 0x07, 0x70, 0x72, 0x65, 0x76, 0x4b, 0x76, 0x73, 0x22, 0x7d, 0x0a, 0x10, 0x4d,
0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 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, 0x19, 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d,
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x66, 0x72, 0x6f, 0x6d,
0x4b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x05, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x22, 0x79, 0x0a, 0x11, 0x4d, 0x6f,
0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 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, 0x2a, 0x0a, 0x02, 0x6b, 0x76, 0x18,
0x02, 0x20, 0x01, 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, 0x02, 0x6b, 0x76, 0x32, 0xab, 0x05, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x72, 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, 0x12, 0x42, 0x0a, 0x03, 0x50, 0x75, 0x74,
0x12, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d,
0x75, 0x65, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x4b, 0x76, 0x73, 0x32, 0xd5, 0x04, 0x0a, 0x05,
0x53, 0x74, 0x6f, 0x72, 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, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x51, 0x0a, 0x08, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x75, 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, 0x50, 0x75, 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, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x72, 0x65, 0x70, 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, 0x12,
0x42, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 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, 0x51, 0x0a, 0x08, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50,
0x75, 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, 0x50, 0x75, 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, 0x50, 0x75,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x42, 0x61, 0x74,
0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63,
0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x60, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x50, 0x75, 0x74,
0x12, 0x26, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x50, 0x75,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70,
0x61, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65,
0x12, 0x24, 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, 0x61, 0x6e, 0x67, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 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, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a,
0x09, 0x4d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4d, 0x6f,
0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23,
0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25,
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65,
0x41, 0x6e, 0x64, 0x50, 0x75, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72,
0x65, 0x41, 0x6e, 0x64, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27,
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x50, 0x75, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, 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, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 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, 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,
@@ -1293,7 +1149,7 @@ func file_greptime_v1_meta_store_proto_rawDescGZIP() []byte {
return file_greptime_v1_meta_store_proto_rawDescData
}
var file_greptime_v1_meta_store_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_greptime_v1_meta_store_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_greptime_v1_meta_store_proto_goTypes = []interface{}{
(*RangeRequest)(nil), // 0: greptime.v1.meta.RangeRequest
(*RangeResponse)(nil), // 1: greptime.v1.meta.RangeResponse
@@ -1309,59 +1165,52 @@ var file_greptime_v1_meta_store_proto_goTypes = []interface{}{
(*CompareAndPutResponse)(nil), // 11: greptime.v1.meta.CompareAndPutResponse
(*DeleteRangeRequest)(nil), // 12: greptime.v1.meta.DeleteRangeRequest
(*DeleteRangeResponse)(nil), // 13: greptime.v1.meta.DeleteRangeResponse
(*MoveValueRequest)(nil), // 14: greptime.v1.meta.MoveValueRequest
(*MoveValueResponse)(nil), // 15: greptime.v1.meta.MoveValueResponse
(*RequestHeader)(nil), // 16: greptime.v1.meta.RequestHeader
(*ResponseHeader)(nil), // 17: greptime.v1.meta.ResponseHeader
(*KeyValue)(nil), // 18: greptime.v1.meta.KeyValue
(*RequestHeader)(nil), // 14: greptime.v1.meta.RequestHeader
(*ResponseHeader)(nil), // 15: greptime.v1.meta.ResponseHeader
(*KeyValue)(nil), // 16: greptime.v1.meta.KeyValue
}
var file_greptime_v1_meta_store_proto_depIdxs = []int32{
16, // 0: greptime.v1.meta.RangeRequest.header:type_name -> greptime.v1.meta.RequestHeader
17, // 1: greptime.v1.meta.RangeResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 2: greptime.v1.meta.RangeResponse.kvs:type_name -> greptime.v1.meta.KeyValue
16, // 3: greptime.v1.meta.PutRequest.header:type_name -> greptime.v1.meta.RequestHeader
17, // 4: greptime.v1.meta.PutResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 5: greptime.v1.meta.PutResponse.prev_kv:type_name -> greptime.v1.meta.KeyValue
16, // 6: greptime.v1.meta.BatchGetRequest.header:type_name -> greptime.v1.meta.RequestHeader
17, // 7: greptime.v1.meta.BatchGetResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 8: greptime.v1.meta.BatchGetResponse.kvs:type_name -> greptime.v1.meta.KeyValue
16, // 9: greptime.v1.meta.BatchPutRequest.header:type_name -> greptime.v1.meta.RequestHeader
18, // 10: greptime.v1.meta.BatchPutRequest.kvs:type_name -> greptime.v1.meta.KeyValue
17, // 11: greptime.v1.meta.BatchPutResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 12: greptime.v1.meta.BatchPutResponse.prev_kvs:type_name -> greptime.v1.meta.KeyValue
16, // 13: greptime.v1.meta.BatchDeleteRequest.header:type_name -> greptime.v1.meta.RequestHeader
17, // 14: greptime.v1.meta.BatchDeleteResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 15: greptime.v1.meta.BatchDeleteResponse.prev_kvs:type_name -> greptime.v1.meta.KeyValue
16, // 16: greptime.v1.meta.CompareAndPutRequest.header:type_name -> greptime.v1.meta.RequestHeader
17, // 17: greptime.v1.meta.CompareAndPutResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 18: greptime.v1.meta.CompareAndPutResponse.prev_kv:type_name -> greptime.v1.meta.KeyValue
16, // 19: greptime.v1.meta.DeleteRangeRequest.header:type_name -> greptime.v1.meta.RequestHeader
17, // 20: greptime.v1.meta.DeleteRangeResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 21: greptime.v1.meta.DeleteRangeResponse.prev_kvs:type_name -> greptime.v1.meta.KeyValue
16, // 22: greptime.v1.meta.MoveValueRequest.header:type_name -> greptime.v1.meta.RequestHeader
17, // 23: greptime.v1.meta.MoveValueResponse.header:type_name -> greptime.v1.meta.ResponseHeader
18, // 24: greptime.v1.meta.MoveValueResponse.kv:type_name -> greptime.v1.meta.KeyValue
0, // 25: greptime.v1.meta.Store.Range:input_type -> greptime.v1.meta.RangeRequest
2, // 26: greptime.v1.meta.Store.Put:input_type -> greptime.v1.meta.PutRequest
4, // 27: greptime.v1.meta.Store.BatchGet:input_type -> greptime.v1.meta.BatchGetRequest
6, // 28: greptime.v1.meta.Store.BatchPut:input_type -> greptime.v1.meta.BatchPutRequest
8, // 29: greptime.v1.meta.Store.BatchDelete:input_type -> greptime.v1.meta.BatchDeleteRequest
10, // 30: greptime.v1.meta.Store.CompareAndPut:input_type -> greptime.v1.meta.CompareAndPutRequest
12, // 31: greptime.v1.meta.Store.DeleteRange:input_type -> greptime.v1.meta.DeleteRangeRequest
14, // 32: greptime.v1.meta.Store.MoveValue:input_type -> greptime.v1.meta.MoveValueRequest
1, // 33: greptime.v1.meta.Store.Range:output_type -> greptime.v1.meta.RangeResponse
3, // 34: greptime.v1.meta.Store.Put:output_type -> greptime.v1.meta.PutResponse
5, // 35: greptime.v1.meta.Store.BatchGet:output_type -> greptime.v1.meta.BatchGetResponse
7, // 36: greptime.v1.meta.Store.BatchPut:output_type -> greptime.v1.meta.BatchPutResponse
9, // 37: greptime.v1.meta.Store.BatchDelete:output_type -> greptime.v1.meta.BatchDeleteResponse
11, // 38: greptime.v1.meta.Store.CompareAndPut:output_type -> greptime.v1.meta.CompareAndPutResponse
13, // 39: greptime.v1.meta.Store.DeleteRange:output_type -> greptime.v1.meta.DeleteRangeResponse
15, // 40: greptime.v1.meta.Store.MoveValue:output_type -> greptime.v1.meta.MoveValueResponse
33, // [33:41] is the sub-list for method output_type
25, // [25:33] is the sub-list for method input_type
25, // [25:25] is the sub-list for extension type_name
25, // [25:25] is the sub-list for extension extendee
0, // [0:25] is the sub-list for field type_name
14, // 0: greptime.v1.meta.RangeRequest.header:type_name -> greptime.v1.meta.RequestHeader
15, // 1: greptime.v1.meta.RangeResponse.header:type_name -> greptime.v1.meta.ResponseHeader
16, // 2: greptime.v1.meta.RangeResponse.kvs:type_name -> greptime.v1.meta.KeyValue
14, // 3: greptime.v1.meta.PutRequest.header:type_name -> greptime.v1.meta.RequestHeader
15, // 4: greptime.v1.meta.PutResponse.header:type_name -> greptime.v1.meta.ResponseHeader
16, // 5: greptime.v1.meta.PutResponse.prev_kv:type_name -> greptime.v1.meta.KeyValue
14, // 6: greptime.v1.meta.BatchGetRequest.header:type_name -> greptime.v1.meta.RequestHeader
15, // 7: greptime.v1.meta.BatchGetResponse.header:type_name -> greptime.v1.meta.ResponseHeader
16, // 8: greptime.v1.meta.BatchGetResponse.kvs:type_name -> greptime.v1.meta.KeyValue
14, // 9: greptime.v1.meta.BatchPutRequest.header:type_name -> greptime.v1.meta.RequestHeader
16, // 10: greptime.v1.meta.BatchPutRequest.kvs:type_name -> greptime.v1.meta.KeyValue
15, // 11: greptime.v1.meta.BatchPutResponse.header:type_name -> greptime.v1.meta.ResponseHeader
16, // 12: greptime.v1.meta.BatchPutResponse.prev_kvs:type_name -> greptime.v1.meta.KeyValue
14, // 13: greptime.v1.meta.BatchDeleteRequest.header:type_name -> greptime.v1.meta.RequestHeader
15, // 14: greptime.v1.meta.BatchDeleteResponse.header:type_name -> greptime.v1.meta.ResponseHeader
16, // 15: greptime.v1.meta.BatchDeleteResponse.prev_kvs:type_name -> greptime.v1.meta.KeyValue
14, // 16: greptime.v1.meta.CompareAndPutRequest.header:type_name -> greptime.v1.meta.RequestHeader
15, // 17: greptime.v1.meta.CompareAndPutResponse.header:type_name -> greptime.v1.meta.ResponseHeader
16, // 18: greptime.v1.meta.CompareAndPutResponse.prev_kv:type_name -> greptime.v1.meta.KeyValue
14, // 19: greptime.v1.meta.DeleteRangeRequest.header:type_name -> greptime.v1.meta.RequestHeader
15, // 20: greptime.v1.meta.DeleteRangeResponse.header:type_name -> greptime.v1.meta.ResponseHeader
16, // 21: greptime.v1.meta.DeleteRangeResponse.prev_kvs:type_name -> greptime.v1.meta.KeyValue
0, // 22: greptime.v1.meta.Store.Range:input_type -> greptime.v1.meta.RangeRequest
2, // 23: greptime.v1.meta.Store.Put:input_type -> greptime.v1.meta.PutRequest
4, // 24: greptime.v1.meta.Store.BatchGet:input_type -> greptime.v1.meta.BatchGetRequest
6, // 25: greptime.v1.meta.Store.BatchPut:input_type -> greptime.v1.meta.BatchPutRequest
8, // 26: greptime.v1.meta.Store.BatchDelete:input_type -> greptime.v1.meta.BatchDeleteRequest
10, // 27: greptime.v1.meta.Store.CompareAndPut:input_type -> greptime.v1.meta.CompareAndPutRequest
12, // 28: greptime.v1.meta.Store.DeleteRange:input_type -> greptime.v1.meta.DeleteRangeRequest
1, // 29: greptime.v1.meta.Store.Range:output_type -> greptime.v1.meta.RangeResponse
3, // 30: greptime.v1.meta.Store.Put:output_type -> greptime.v1.meta.PutResponse
5, // 31: greptime.v1.meta.Store.BatchGet:output_type -> greptime.v1.meta.BatchGetResponse
7, // 32: greptime.v1.meta.Store.BatchPut:output_type -> greptime.v1.meta.BatchPutResponse
9, // 33: greptime.v1.meta.Store.BatchDelete:output_type -> greptime.v1.meta.BatchDeleteResponse
11, // 34: greptime.v1.meta.Store.CompareAndPut:output_type -> greptime.v1.meta.CompareAndPutResponse
13, // 35: greptime.v1.meta.Store.DeleteRange:output_type -> greptime.v1.meta.DeleteRangeResponse
29, // [29:36] is the sub-list for method output_type
22, // [22:29] is the sub-list for method input_type
22, // [22:22] is the sub-list for extension type_name
22, // [22:22] is the sub-list for extension extendee
0, // [0:22] is the sub-list for field type_name
}
func init() { file_greptime_v1_meta_store_proto_init() }
@@ -1539,30 +1388,6 @@ func file_greptime_v1_meta_store_proto_init() {
return nil
}
}
file_greptime_v1_meta_store_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MoveValueRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_store_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MoveValueResponse); 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{
@@ -1570,7 +1395,7 @@ func file_greptime_v1_meta_store_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_meta_store_proto_rawDesc,
NumEnums: 0,
NumMessages: 16,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},
-38
View File
@@ -38,8 +38,6 @@ type StoreClient interface {
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 {
@@ -113,15 +111,6 @@ func (c *storeClient) DeleteRange(ctx context.Context, in *DeleteRangeRequest, o
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
@@ -142,8 +131,6 @@ type StoreServer interface {
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()
}
@@ -172,9 +159,6 @@ func (UnimplementedStoreServer) CompareAndPut(context.Context, *CompareAndPutReq
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.
@@ -314,24 +298,6 @@ func _Store_DeleteRange_Handler(srv interface{}, ctx context.Context, dec func(i
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)
@@ -367,10 +333,6 @@ var Store_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeleteRange",
Handler: _Store_DeleteRange_Handler,
},
{
MethodName: "MoveValue",
Handler: _Store_MoveValue_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/meta/store.proto",