package client
import (
error1 "github.com/deventlab/d-engine/proto/error"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ReadConsistencyPolicy int32
const (
ReadConsistencyPolicy_READ_CONSISTENCY_POLICY_LEASE_READ ReadConsistencyPolicy = 0
ReadConsistencyPolicy_READ_CONSISTENCY_POLICY_LINEARIZABLE_READ ReadConsistencyPolicy = 1
ReadConsistencyPolicy_READ_CONSISTENCY_POLICY_EVENTUAL_CONSISTENCY ReadConsistencyPolicy = 2
)
var (
ReadConsistencyPolicy_name = map[int32]string{
0: "READ_CONSISTENCY_POLICY_LEASE_READ",
1: "READ_CONSISTENCY_POLICY_LINEARIZABLE_READ",
2: "READ_CONSISTENCY_POLICY_EVENTUAL_CONSISTENCY",
}
ReadConsistencyPolicy_value = map[string]int32{
"READ_CONSISTENCY_POLICY_LEASE_READ": 0,
"READ_CONSISTENCY_POLICY_LINEARIZABLE_READ": 1,
"READ_CONSISTENCY_POLICY_EVENTUAL_CONSISTENCY": 2,
}
)
func (x ReadConsistencyPolicy) Enum() *ReadConsistencyPolicy {
p := new(ReadConsistencyPolicy)
*p = x
return p
}
func (x ReadConsistencyPolicy) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReadConsistencyPolicy) Descriptor() protoreflect.EnumDescriptor {
return file_proto_client_client_api_proto_enumTypes[0].Descriptor()
}
func (ReadConsistencyPolicy) Type() protoreflect.EnumType {
return &file_proto_client_client_api_proto_enumTypes[0]
}
func (x ReadConsistencyPolicy) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
func (ReadConsistencyPolicy) EnumDescriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{0}
}
type WatchEventType int32
const (
WatchEventType_WATCH_EVENT_TYPE_PUT WatchEventType = 0
WatchEventType_WATCH_EVENT_TYPE_DELETE WatchEventType = 1
)
var (
WatchEventType_name = map[int32]string{
0: "WATCH_EVENT_TYPE_PUT",
1: "WATCH_EVENT_TYPE_DELETE",
}
WatchEventType_value = map[string]int32{
"WATCH_EVENT_TYPE_PUT": 0,
"WATCH_EVENT_TYPE_DELETE": 1,
}
)
func (x WatchEventType) Enum() *WatchEventType {
p := new(WatchEventType)
*p = x
return p
}
func (x WatchEventType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (WatchEventType) Descriptor() protoreflect.EnumDescriptor {
return file_proto_client_client_api_proto_enumTypes[1].Descriptor()
}
func (WatchEventType) Type() protoreflect.EnumType {
return &file_proto_client_client_api_proto_enumTypes[1]
}
func (x WatchEventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
func (WatchEventType) EnumDescriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{1}
}
type WriteCommand struct {
state protoimpl.MessageState `protogen:"open.v1"`
Operation isWriteCommand_Operation `protobuf_oneof:"operation"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WriteCommand) Reset() {
*x = WriteCommand{}
mi := &file_proto_client_client_api_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WriteCommand) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteCommand) ProtoMessage() {}
func (x *WriteCommand) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*WriteCommand) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{0}
}
func (x *WriteCommand) GetOperation() isWriteCommand_Operation {
if x != nil {
return x.Operation
}
return nil
}
func (x *WriteCommand) GetInsert() *WriteCommand_Insert {
if x != nil {
if x, ok := x.Operation.(*WriteCommand_Insert_); ok {
return x.Insert
}
}
return nil
}
func (x *WriteCommand) GetDelete() *WriteCommand_Delete {
if x != nil {
if x, ok := x.Operation.(*WriteCommand_Delete_); ok {
return x.Delete
}
}
return nil
}
func (x *WriteCommand) GetCompareAndSwap() *WriteCommand_CompareAndSwap {
if x != nil {
if x, ok := x.Operation.(*WriteCommand_CompareAndSwap_); ok {
return x.CompareAndSwap
}
}
return nil
}
type isWriteCommand_Operation interface {
isWriteCommand_Operation()
}
type WriteCommand_Insert_ struct {
Insert *WriteCommand_Insert `protobuf:"bytes,1,opt,name=insert,proto3,oneof"`
}
type WriteCommand_Delete_ struct {
Delete *WriteCommand_Delete `protobuf:"bytes,2,opt,name=delete,proto3,oneof"`
}
type WriteCommand_CompareAndSwap_ struct {
CompareAndSwap *WriteCommand_CompareAndSwap `protobuf:"bytes,3,opt,name=compare_and_swap,json=compareAndSwap,proto3,oneof"`
}
func (*WriteCommand_Insert_) isWriteCommand_Operation() {}
func (*WriteCommand_Delete_) isWriteCommand_Operation() {}
func (*WriteCommand_CompareAndSwap_) isWriteCommand_Operation() {}
type ClientWriteRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ClientId uint32 `protobuf:"varint,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
Command *WriteCommand `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ClientWriteRequest) Reset() {
*x = ClientWriteRequest{}
mi := &file_proto_client_client_api_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ClientWriteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClientWriteRequest) ProtoMessage() {}
func (x *ClientWriteRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*ClientWriteRequest) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{1}
}
func (x *ClientWriteRequest) GetClientId() uint32 {
if x != nil {
return x.ClientId
}
return 0
}
func (x *ClientWriteRequest) GetCommand() *WriteCommand {
if x != nil {
return x.Command
}
return nil
}
type ClientReadRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ClientId uint32 `protobuf:"varint,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` ConsistencyPolicy *ReadConsistencyPolicy `protobuf:"varint,3,opt,name=consistency_policy,json=consistencyPolicy,proto3,enum=d_engine.client.ReadConsistencyPolicy,oneof" json:"consistency_policy,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ClientReadRequest) Reset() {
*x = ClientReadRequest{}
mi := &file_proto_client_client_api_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ClientReadRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClientReadRequest) ProtoMessage() {}
func (x *ClientReadRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*ClientReadRequest) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{2}
}
func (x *ClientReadRequest) GetClientId() uint32 {
if x != nil {
return x.ClientId
}
return 0
}
func (x *ClientReadRequest) GetKeys() [][]byte {
if x != nil {
return x.Keys
}
return nil
}
func (x *ClientReadRequest) GetConsistencyPolicy() ReadConsistencyPolicy {
if x != nil && x.ConsistencyPolicy != nil {
return *x.ConsistencyPolicy
}
return ReadConsistencyPolicy_READ_CONSISTENCY_POLICY_LEASE_READ
}
type WriteResult struct {
state protoimpl.MessageState `protogen:"open.v1"`
Succeeded bool `protobuf:"varint,1,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WriteResult) Reset() {
*x = WriteResult{}
mi := &file_proto_client_client_api_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WriteResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteResult) ProtoMessage() {}
func (x *WriteResult) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*WriteResult) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{3}
}
func (x *WriteResult) GetSucceeded() bool {
if x != nil {
return x.Succeeded
}
return false
}
type ClientResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Error error1.ErrorCode `protobuf:"varint,1,opt,name=error,proto3,enum=d_engine.error.ErrorCode" json:"error,omitempty"`
SuccessResult isClientResponse_SuccessResult `protobuf_oneof:"success_result"`
Metadata *error1.ErrorMetadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ClientResponse) Reset() {
*x = ClientResponse{}
mi := &file_proto_client_client_api_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ClientResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClientResponse) ProtoMessage() {}
func (x *ClientResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*ClientResponse) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{4}
}
func (x *ClientResponse) GetError() error1.ErrorCode {
if x != nil {
return x.Error
}
return error1.ErrorCode(0)
}
func (x *ClientResponse) GetSuccessResult() isClientResponse_SuccessResult {
if x != nil {
return x.SuccessResult
}
return nil
}
func (x *ClientResponse) GetWriteResult() *WriteResult {
if x != nil {
if x, ok := x.SuccessResult.(*ClientResponse_WriteResult); ok {
return x.WriteResult
}
}
return nil
}
func (x *ClientResponse) GetReadData() *ReadResults {
if x != nil {
if x, ok := x.SuccessResult.(*ClientResponse_ReadData); ok {
return x.ReadData
}
}
return nil
}
func (x *ClientResponse) GetMetadata() *error1.ErrorMetadata {
if x != nil {
return x.Metadata
}
return nil
}
type isClientResponse_SuccessResult interface {
isClientResponse_SuccessResult()
}
type ClientResponse_WriteResult struct {
WriteResult *WriteResult `protobuf:"bytes,2,opt,name=write_result,json=writeResult,proto3,oneof"`
}
type ClientResponse_ReadData struct {
ReadData *ReadResults `protobuf:"bytes,3,opt,name=read_data,json=readData,proto3,oneof"`
}
func (*ClientResponse_WriteResult) isClientResponse_SuccessResult() {}
func (*ClientResponse_ReadData) isClientResponse_SuccessResult() {}
type ClientResult struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ClientResult) Reset() {
*x = ClientResult{}
mi := &file_proto_client_client_api_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ClientResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClientResult) ProtoMessage() {}
func (x *ClientResult) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*ClientResult) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{5}
}
func (x *ClientResult) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *ClientResult) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
type ReadResults struct {
state protoimpl.MessageState `protogen:"open.v1"`
Results []*ClientResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ReadResults) Reset() {
*x = ReadResults{}
mi := &file_proto_client_client_api_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ReadResults) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReadResults) ProtoMessage() {}
func (x *ReadResults) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*ReadResults) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{6}
}
func (x *ReadResults) GetResults() []*ClientResult {
if x != nil {
return x.Results
}
return nil
}
type WatchRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ClientId uint32 `protobuf:"varint,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WatchRequest) Reset() {
*x = WatchRequest{}
mi := &file_proto_client_client_api_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WatchRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WatchRequest) ProtoMessage() {}
func (x *WatchRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*WatchRequest) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{7}
}
func (x *WatchRequest) GetClientId() uint32 {
if x != nil {
return x.ClientId
}
return 0
}
func (x *WatchRequest) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
type WatchResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
EventType WatchEventType `protobuf:"varint,3,opt,name=event_type,json=eventType,proto3,enum=d_engine.client.WatchEventType" json:"event_type,omitempty"`
Error error1.ErrorCode `protobuf:"varint,4,opt,name=error,proto3,enum=d_engine.error.ErrorCode" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WatchResponse) Reset() {
*x = WatchResponse{}
mi := &file_proto_client_client_api_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WatchResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WatchResponse) ProtoMessage() {}
func (x *WatchResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*WatchResponse) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{8}
}
func (x *WatchResponse) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *WatchResponse) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
func (x *WatchResponse) GetEventType() WatchEventType {
if x != nil {
return x.EventType
}
return WatchEventType_WATCH_EVENT_TYPE_PUT
}
func (x *WatchResponse) GetError() error1.ErrorCode {
if x != nil {
return x.Error
}
return error1.ErrorCode(0)
}
type WriteCommand_Insert struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
TtlSecs uint64 `protobuf:"varint,3,opt,name=ttl_secs,json=ttlSecs,proto3" json:"ttl_secs,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WriteCommand_Insert) Reset() {
*x = WriteCommand_Insert{}
mi := &file_proto_client_client_api_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WriteCommand_Insert) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteCommand_Insert) ProtoMessage() {}
func (x *WriteCommand_Insert) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*WriteCommand_Insert) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{0, 0}
}
func (x *WriteCommand_Insert) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *WriteCommand_Insert) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
func (x *WriteCommand_Insert) GetTtlSecs() uint64 {
if x != nil {
return x.TtlSecs
}
return 0
}
type WriteCommand_Delete struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WriteCommand_Delete) Reset() {
*x = WriteCommand_Delete{}
mi := &file_proto_client_client_api_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WriteCommand_Delete) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteCommand_Delete) ProtoMessage() {}
func (x *WriteCommand_Delete) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*WriteCommand_Delete) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{0, 1}
}
func (x *WriteCommand_Delete) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
type WriteCommand_CompareAndSwap struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
ExpectedValue []byte `protobuf:"bytes,2,opt,name=expected_value,json=expectedValue,proto3,oneof" json:"expected_value,omitempty"` NewValue []byte `protobuf:"bytes,3,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"` unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WriteCommand_CompareAndSwap) Reset() {
*x = WriteCommand_CompareAndSwap{}
mi := &file_proto_client_client_api_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WriteCommand_CompareAndSwap) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteCommand_CompareAndSwap) ProtoMessage() {}
func (x *WriteCommand_CompareAndSwap) ProtoReflect() protoreflect.Message {
mi := &file_proto_client_client_api_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*WriteCommand_CompareAndSwap) Descriptor() ([]byte, []int) {
return file_proto_client_client_api_proto_rawDescGZIP(), []int{0, 2}
}
func (x *WriteCommand_CompareAndSwap) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *WriteCommand_CompareAndSwap) GetExpectedValue() []byte {
if x != nil {
return x.ExpectedValue
}
return nil
}
func (x *WriteCommand_CompareAndSwap) GetNewValue() []byte {
if x != nil {
return x.NewValue
}
return nil
}
var File_proto_client_client_api_proto protoreflect.FileDescriptor
const file_proto_client_client_api_proto_rawDesc = "" +
"\n" +
"\x1dproto/client/client_api.proto\x12\x0fd_engine.client\x1a\x11proto/error.proto\"\xde\x03\n" +
"\fWriteCommand\x12>\n" +
"\x06insert\x18\x01 \x01(\v2$.d_engine.client.WriteCommand.InsertH\x00R\x06insert\x12>\n" +
"\x06delete\x18\x02 \x01(\v2$.d_engine.client.WriteCommand.DeleteH\x00R\x06delete\x12X\n" +
"\x10compare_and_swap\x18\x03 \x01(\v2,.d_engine.client.WriteCommand.CompareAndSwapH\x00R\x0ecompareAndSwap\x1aK\n" +
"\x06Insert\x12\x10\n" +
"\x03key\x18\x01 \x01(\fR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\fR\x05value\x12\x19\n" +
"\bttl_secs\x18\x03 \x01(\x04R\attlSecs\x1a\x1a\n" +
"\x06Delete\x12\x10\n" +
"\x03key\x18\x01 \x01(\fR\x03key\x1a~\n" +
"\x0eCompareAndSwap\x12\x10\n" +
"\x03key\x18\x01 \x01(\fR\x03key\x12*\n" +
"\x0eexpected_value\x18\x02 \x01(\fH\x00R\rexpectedValue\x88\x01\x01\x12\x1b\n" +
"\tnew_value\x18\x03 \x01(\fR\bnewValueB\x11\n" +
"\x0f_expected_valueB\v\n" +
"\toperation\"j\n" +
"\x12ClientWriteRequest\x12\x1b\n" +
"\tclient_id\x18\x01 \x01(\rR\bclientId\x127\n" +
"\acommand\x18\x02 \x01(\v2\x1d.d_engine.client.WriteCommandR\acommand\"\xb7\x01\n" +
"\x11ClientReadRequest\x12\x1b\n" +
"\tclient_id\x18\x01 \x01(\rR\bclientId\x12\x12\n" +
"\x04keys\x18\x02 \x03(\fR\x04keys\x12Z\n" +
"\x12consistency_policy\x18\x03 \x01(\x0e2&.d_engine.client.ReadConsistencyPolicyH\x00R\x11consistencyPolicy\x88\x01\x01B\x15\n" +
"\x13_consistency_policy\"+\n" +
"\vWriteResult\x12\x1c\n" +
"\tsucceeded\x18\x01 \x01(\bR\tsucceeded\"\x8e\x02\n" +
"\x0eClientResponse\x12/\n" +
"\x05error\x18\x01 \x01(\x0e2\x19.d_engine.error.ErrorCodeR\x05error\x12A\n" +
"\fwrite_result\x18\x02 \x01(\v2\x1c.d_engine.client.WriteResultH\x00R\vwriteResult\x12;\n" +
"\tread_data\x18\x03 \x01(\v2\x1c.d_engine.client.ReadResultsH\x00R\breadData\x129\n" +
"\bmetadata\x18\x04 \x01(\v2\x1d.d_engine.error.ErrorMetadataR\bmetadataB\x10\n" +
"\x0esuccess_result\"6\n" +
"\fClientResult\x12\x10\n" +
"\x03key\x18\x01 \x01(\fR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\fR\x05value\"F\n" +
"\vReadResults\x127\n" +
"\aresults\x18\x01 \x03(\v2\x1d.d_engine.client.ClientResultR\aresults\"=\n" +
"\fWatchRequest\x12\x1b\n" +
"\tclient_id\x18\x01 \x01(\rR\bclientId\x12\x10\n" +
"\x03key\x18\x02 \x01(\fR\x03key\"\xa8\x01\n" +
"\rWatchResponse\x12\x10\n" +
"\x03key\x18\x01 \x01(\fR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\fR\x05value\x12>\n" +
"\n" +
"event_type\x18\x03 \x01(\x0e2\x1f.d_engine.client.WatchEventTypeR\teventType\x12/\n" +
"\x05error\x18\x04 \x01(\x0e2\x19.d_engine.error.ErrorCodeR\x05error*\xa0\x01\n" +
"\x15ReadConsistencyPolicy\x12&\n" +
"\"READ_CONSISTENCY_POLICY_LEASE_READ\x10\x00\x12-\n" +
")READ_CONSISTENCY_POLICY_LINEARIZABLE_READ\x10\x01\x120\n" +
",READ_CONSISTENCY_POLICY_EVENTUAL_CONSISTENCY\x10\x02*G\n" +
"\x0eWatchEventType\x12\x18\n" +
"\x14WATCH_EVENT_TYPE_PUT\x10\x00\x12\x1b\n" +
"\x17WATCH_EVENT_TYPE_DELETE\x10\x012\x91\x02\n" +
"\x11RaftClientService\x12Y\n" +
"\x11HandleClientWrite\x12#.d_engine.client.ClientWriteRequest\x1a\x1f.d_engine.client.ClientResponse\x12W\n" +
"\x10HandleClientRead\x12\".d_engine.client.ClientReadRequest\x1a\x1f.d_engine.client.ClientResponse\x12H\n" +
"\x05Watch\x12\x1d.d_engine.client.WatchRequest\x1a\x1e.d_engine.client.WatchResponse0\x01B,Z*github.com/deventlab/d-engine/proto/clientb\x06proto3"
var (
file_proto_client_client_api_proto_rawDescOnce sync.Once
file_proto_client_client_api_proto_rawDescData []byte
)
func file_proto_client_client_api_proto_rawDescGZIP() []byte {
file_proto_client_client_api_proto_rawDescOnce.Do(func() {
file_proto_client_client_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_client_client_api_proto_rawDesc), len(file_proto_client_client_api_proto_rawDesc)))
})
return file_proto_client_client_api_proto_rawDescData
}
var file_proto_client_client_api_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_proto_client_client_api_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_proto_client_client_api_proto_goTypes = []any{
(ReadConsistencyPolicy)(0), (WatchEventType)(0), (*WriteCommand)(nil), (*ClientWriteRequest)(nil), (*ClientReadRequest)(nil), (*WriteResult)(nil), (*ClientResponse)(nil), (*ClientResult)(nil), (*ReadResults)(nil), (*WatchRequest)(nil), (*WatchResponse)(nil), (*WriteCommand_Insert)(nil), (*WriteCommand_Delete)(nil), (*WriteCommand_CompareAndSwap)(nil), (error1.ErrorCode)(0), (*error1.ErrorMetadata)(nil), }
var file_proto_client_client_api_proto_depIdxs = []int32{
11, 12, 13, 2, 0, 14, 5, 8, 15, 7, 1, 14, 3, 4, 9, 6, 6, 10, 15, 12, 12, 12, 0, }
func init() { file_proto_client_client_api_proto_init() }
func file_proto_client_client_api_proto_init() {
if File_proto_client_client_api_proto != nil {
return
}
file_proto_client_client_api_proto_msgTypes[0].OneofWrappers = []any{
(*WriteCommand_Insert_)(nil),
(*WriteCommand_Delete_)(nil),
(*WriteCommand_CompareAndSwap_)(nil),
}
file_proto_client_client_api_proto_msgTypes[2].OneofWrappers = []any{}
file_proto_client_client_api_proto_msgTypes[4].OneofWrappers = []any{
(*ClientResponse_WriteResult)(nil),
(*ClientResponse_ReadData)(nil),
}
file_proto_client_client_api_proto_msgTypes[11].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_client_client_api_proto_rawDesc), len(file_proto_client_client_api_proto_rawDesc)),
NumEnums: 2,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_client_client_api_proto_goTypes,
DependencyIndexes: file_proto_client_client_api_proto_depIdxs,
EnumInfos: file_proto_client_client_api_proto_enumTypes,
MessageInfos: file_proto_client_client_api_proto_msgTypes,
}.Build()
File_proto_client_client_api_proto = out.File
file_proto_client_client_api_proto_goTypes = nil
file_proto_client_client_api_proto_depIdxs = nil
}