Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterInternalServer(s grpc.ServiceRegistrar, srv InternalServer)
- func RegisterRawKVServer(s grpc.ServiceRegistrar, srv RawKVServer)
- func RegisterTransactionalKVServer(s grpc.ServiceRegistrar, srv TransactionalKVServer)
- type CommitRequest
- func (*CommitRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CommitRequest) GetKeys() [][]byte
- func (x *CommitRequest) GetStartTs() uint64
- func (*CommitRequest) ProtoMessage()
- func (x *CommitRequest) ProtoReflect() protoreflect.Message
- func (x *CommitRequest) Reset()
- func (x *CommitRequest) String() string
- type CommitResponse
- func (*CommitResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CommitResponse) GetCommitIndex() uint64
- func (x *CommitResponse) GetErrors() []*KeyError
- func (x *CommitResponse) GetSuccess() bool
- func (*CommitResponse) ProtoMessage()
- func (x *CommitResponse) ProtoReflect() protoreflect.Message
- func (x *CommitResponse) Reset()
- func (x *CommitResponse) String() string
- type DeleteRequest
- type DeleteResponse
- func (*DeleteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteResponse) GetCommitIndex() uint64
- func (x *DeleteResponse) GetSuccess() bool
- func (*DeleteResponse) ProtoMessage()
- func (x *DeleteResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteResponse) Reset()
- func (x *DeleteResponse) String() string
- type ForwardRequest
- func (*ForwardRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardRequest) GetIsTxn() bool
- func (x *ForwardRequest) GetRequests() []*Request
- func (*ForwardRequest) ProtoMessage()
- func (x *ForwardRequest) ProtoReflect() protoreflect.Message
- func (x *ForwardRequest) Reset()
- func (x *ForwardRequest) String() string
- type ForwardResponse
- func (*ForwardResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardResponse) GetCommitIndex() uint64
- func (x *ForwardResponse) GetSuccess() bool
- func (*ForwardResponse) ProtoMessage()
- func (x *ForwardResponse) ProtoReflect() protoreflect.Message
- func (x *ForwardResponse) Reset()
- func (x *ForwardResponse) String() string
- type GetRequest
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetReadAtIndex() uint64
- func (x *GetResponse) GetValue() []byte
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- type InternalClient
- type InternalServer
- type KeyError
- type Kv
- type Mutation
- func (*Mutation) Descriptor() ([]byte, []int)deprecated
- func (x *Mutation) GetKey() []byte
- func (x *Mutation) GetOp() Op
- func (x *Mutation) GetValue() []byte
- func (*Mutation) ProtoMessage()
- func (x *Mutation) ProtoReflect() protoreflect.Message
- func (x *Mutation) Reset()
- func (x *Mutation) String() string
- type Op
- type Phase
- type PreCommitResponse
- func (*PreCommitResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PreCommitResponse) GetErrors() []*KeyError
- func (*PreCommitResponse) ProtoMessage()
- func (x *PreCommitResponse) ProtoReflect() protoreflect.Message
- func (x *PreCommitResponse) Reset()
- func (x *PreCommitResponse) String() string
- type PreWriteRequest
- func (*PreWriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PreWriteRequest) GetLockTtl() uint64
- func (x *PreWriteRequest) GetMutations() []*Kv
- func (x *PreWriteRequest) GetStartTs() uint64
- func (*PreWriteRequest) ProtoMessage()
- func (x *PreWriteRequest) ProtoReflect() protoreflect.Message
- func (x *PreWriteRequest) Reset()
- func (x *PreWriteRequest) String() string
- type PutRequest
- type PutResponse
- func (*PutResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PutResponse) GetCommitIndex() uint64
- func (x *PutResponse) GetSuccess() bool
- func (*PutResponse) ProtoMessage()
- func (x *PutResponse) ProtoReflect() protoreflect.Message
- func (x *PutResponse) Reset()
- func (x *PutResponse) String() string
- type RawDeleteRequest
- type RawDeleteResponse
- func (*RawDeleteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RawDeleteResponse) GetCommitIndex() uint64
- func (x *RawDeleteResponse) GetSuccess() bool
- func (*RawDeleteResponse) ProtoMessage()
- func (x *RawDeleteResponse) ProtoReflect() protoreflect.Message
- func (x *RawDeleteResponse) Reset()
- func (x *RawDeleteResponse) String() string
- type RawGetRequest
- type RawGetResponse
- func (*RawGetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RawGetResponse) GetReadAtIndex() uint64
- func (x *RawGetResponse) GetValue() []byte
- func (*RawGetResponse) ProtoMessage()
- func (x *RawGetResponse) ProtoReflect() protoreflect.Message
- func (x *RawGetResponse) Reset()
- func (x *RawGetResponse) String() string
- type RawKVClient
- type RawKVServer
- type RawPutRequest
- func (*RawPutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RawPutRequest) GetKey() []byte
- func (x *RawPutRequest) GetValue() []byte
- func (*RawPutRequest) ProtoMessage()
- func (x *RawPutRequest) ProtoReflect() protoreflect.Message
- func (x *RawPutRequest) Reset()
- func (x *RawPutRequest) String() string
- type RawPutResponse
- func (*RawPutResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RawPutResponse) GetCommitIndex() uint64
- func (x *RawPutResponse) GetSuccess() bool
- func (*RawPutResponse) ProtoMessage()
- func (x *RawPutResponse) ProtoReflect() protoreflect.Message
- func (x *RawPutResponse) Reset()
- func (x *RawPutResponse) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetIsTxn() bool
- func (x *Request) GetMutations() []*Mutation
- func (x *Request) GetPhase() Phase
- func (x *Request) GetTs() uint64
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type RollbackRequest
- type RollbackResponse
- type ScanRequest
- func (*ScanRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ScanRequest) GetEndKey() []byte
- func (x *ScanRequest) GetLimit() uint64
- func (x *ScanRequest) GetStartKey() []byte
- func (*ScanRequest) ProtoMessage()
- func (x *ScanRequest) ProtoReflect() protoreflect.Message
- func (x *ScanRequest) Reset()
- func (x *ScanRequest) String() string
- type ScanResponse
- type TransactionalKVClient
- type TransactionalKVServer
- type UnimplementedInternalServer
- type UnimplementedRawKVServer
- type UnimplementedTransactionalKVServer
- func (UnimplementedTransactionalKVServer) Commit(context.Context, *CommitRequest) (*CommitResponse, error)
- func (UnimplementedTransactionalKVServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedTransactionalKVServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedTransactionalKVServer) PreWrite(context.Context, *PreWriteRequest) (*PreCommitResponse, error)
- func (UnimplementedTransactionalKVServer) Put(context.Context, *PutRequest) (*PutResponse, error)
- func (UnimplementedTransactionalKVServer) Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)
- func (UnimplementedTransactionalKVServer) Scan(context.Context, *ScanRequest) (*ScanResponse, error)
- type UnsafeInternalServer
- type UnsafeRawKVServer
- type UnsafeTransactionalKVServer
Constants ¶
const ( RawKV_RawPut_FullMethodName = "/RawKV/RawPut" RawKV_RawGet_FullMethodName = "/RawKV/RawGet" RawKV_RawDelete_FullMethodName = "/RawKV/RawDelete" )
const ( TransactionalKV_Put_FullMethodName = "/TransactionalKV/Put" TransactionalKV_Get_FullMethodName = "/TransactionalKV/Get" TransactionalKV_Delete_FullMethodName = "/TransactionalKV/Delete" TransactionalKV_Scan_FullMethodName = "/TransactionalKV/Scan" TransactionalKV_PreWrite_FullMethodName = "/TransactionalKV/PreWrite" TransactionalKV_Commit_FullMethodName = "/TransactionalKV/Commit" TransactionalKV_Rollback_FullMethodName = "/TransactionalKV/Rollback" )
const (
Internal_Forward_FullMethodName = "/Internal/Forward"
)
Variables ¶
var ( Op_name = map[int32]string{ 0: "PUT", 1: "DEL", } Op_value = map[string]int32{ "PUT": 0, "DEL": 1, } )
Enum value maps for Op.
var ( Phase_name = map[int32]string{ 0: "NONE", 1: "PREPARE", 2: "COMMIT", 3: "ABORT", } Phase_value = map[string]int32{ "NONE": 0, "PREPARE": 1, "COMMIT": 2, "ABORT": 3, } )
Enum value maps for Phase.
var File_internal_proto protoreflect.FileDescriptor
var File_service_proto protoreflect.FileDescriptor
var Internal_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Internal", HandlerType: (*InternalServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Forward", Handler: _Internal_Forward_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal.proto", }
Internal_ServiceDesc is the grpc.ServiceDesc for Internal service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var RawKV_ServiceDesc = grpc.ServiceDesc{ ServiceName: "RawKV", HandlerType: (*RawKVServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RawPut", Handler: _RawKV_RawPut_Handler, }, { MethodName: "RawGet", Handler: _RawKV_RawGet_Handler, }, { MethodName: "RawDelete", Handler: _RawKV_RawDelete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.proto", }
RawKV_ServiceDesc is the grpc.ServiceDesc for RawKV service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TransactionalKV_ServiceDesc = grpc.ServiceDesc{ ServiceName: "TransactionalKV", HandlerType: (*TransactionalKVServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Put", Handler: _TransactionalKV_Put_Handler, }, { MethodName: "Get", Handler: _TransactionalKV_Get_Handler, }, { MethodName: "Delete", Handler: _TransactionalKV_Delete_Handler, }, { MethodName: "Scan", Handler: _TransactionalKV_Scan_Handler, }, { MethodName: "PreWrite", Handler: _TransactionalKV_PreWrite_Handler, }, { MethodName: "Commit", Handler: _TransactionalKV_Commit_Handler, }, { MethodName: "Rollback", Handler: _TransactionalKV_Rollback_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.proto", }
TransactionalKV_ServiceDesc is the grpc.ServiceDesc for TransactionalKV service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInternalServer ¶
func RegisterInternalServer(s grpc.ServiceRegistrar, srv InternalServer)
func RegisterRawKVServer ¶
func RegisterRawKVServer(s grpc.ServiceRegistrar, srv RawKVServer)
func RegisterTransactionalKVServer ¶
func RegisterTransactionalKVServer(s grpc.ServiceRegistrar, srv TransactionalKVServer)
Types ¶
type CommitRequest ¶
type CommitRequest struct { // start_ts is the timestamp of prewrite request. StartTs uint64 `protobuf:"varint,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"` Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` // contains filtered or unexported fields }
func (*CommitRequest) Descriptor
deprecated
func (*CommitRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommitRequest.ProtoReflect.Descriptor instead.
func (*CommitRequest) GetKeys ¶
func (x *CommitRequest) GetKeys() [][]byte
func (*CommitRequest) GetStartTs ¶
func (x *CommitRequest) GetStartTs() uint64
func (*CommitRequest) ProtoMessage ¶
func (*CommitRequest) ProtoMessage()
func (*CommitRequest) ProtoReflect ¶
func (x *CommitRequest) ProtoReflect() protoreflect.Message
func (*CommitRequest) Reset ¶
func (x *CommitRequest) Reset()
func (*CommitRequest) String ¶
func (x *CommitRequest) String() string
type CommitResponse ¶
type CommitResponse struct { CommitIndex uint64 `protobuf:"varint,1,opt,name=commit_index,json=commitIndex,proto3" json:"commit_index,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` Errors []*KeyError `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` // contains filtered or unexported fields }
func (*CommitResponse) Descriptor
deprecated
func (*CommitResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommitResponse.ProtoReflect.Descriptor instead.
func (*CommitResponse) GetCommitIndex ¶
func (x *CommitResponse) GetCommitIndex() uint64
func (*CommitResponse) GetErrors ¶
func (x *CommitResponse) GetErrors() []*KeyError
func (*CommitResponse) GetSuccess ¶
func (x *CommitResponse) GetSuccess() bool
func (*CommitResponse) ProtoMessage ¶
func (*CommitResponse) ProtoMessage()
func (*CommitResponse) ProtoReflect ¶
func (x *CommitResponse) ProtoReflect() protoreflect.Message
func (*CommitResponse) Reset ¶
func (x *CommitResponse) Reset()
func (*CommitResponse) String ¶
func (x *CommitResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetKey ¶
func (x *DeleteRequest) GetKey() []byte
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct { CommitIndex uint64 `protobuf:"varint,1,opt,name=commit_index,json=commitIndex,proto3" json:"commit_index,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) GetCommitIndex ¶
func (x *DeleteResponse) GetCommitIndex() uint64
func (*DeleteResponse) GetSuccess ¶
func (x *DeleteResponse) GetSuccess() bool
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type ForwardRequest ¶
type ForwardRequest struct { IsTxn bool `protobuf:"varint,1,opt,name=is_txn,json=isTxn,proto3" json:"is_txn,omitempty"` Requests []*Request `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` // contains filtered or unexported fields }
func (*ForwardRequest) Descriptor
deprecated
func (*ForwardRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForwardRequest.ProtoReflect.Descriptor instead.
func (*ForwardRequest) GetIsTxn ¶
func (x *ForwardRequest) GetIsTxn() bool
func (*ForwardRequest) GetRequests ¶
func (x *ForwardRequest) GetRequests() []*Request
func (*ForwardRequest) ProtoMessage ¶
func (*ForwardRequest) ProtoMessage()
func (*ForwardRequest) ProtoReflect ¶
func (x *ForwardRequest) ProtoReflect() protoreflect.Message
func (*ForwardRequest) Reset ¶
func (x *ForwardRequest) Reset()
func (*ForwardRequest) String ¶
func (x *ForwardRequest) String() string
type ForwardResponse ¶
type ForwardResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` CommitIndex uint64 `protobuf:"varint,2,opt,name=commit_index,json=commitIndex,proto3" json:"commit_index,omitempty"` // contains filtered or unexported fields }
for internal leader redirect
func (*ForwardResponse) Descriptor
deprecated
func (*ForwardResponse) Descriptor() ([]byte, []int)
Deprecated: Use ForwardResponse.ProtoReflect.Descriptor instead.
func (*ForwardResponse) GetCommitIndex ¶
func (x *ForwardResponse) GetCommitIndex() uint64
func (*ForwardResponse) GetSuccess ¶
func (x *ForwardResponse) GetSuccess() bool
func (*ForwardResponse) ProtoMessage ¶
func (*ForwardResponse) ProtoMessage()
func (*ForwardResponse) ProtoReflect ¶
func (x *ForwardResponse) ProtoReflect() protoreflect.Message
func (*ForwardResponse) Reset ¶
func (x *ForwardResponse) Reset()
func (*ForwardResponse) String ¶
func (x *ForwardResponse) String() string
type GetRequest ¶
type GetRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetKey ¶
func (x *GetRequest) GetKey() []byte
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { ReadAtIndex uint64 `protobuf:"varint,1,opt,name=read_at_index,json=readAtIndex,proto3" json:"read_at_index,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetReadAtIndex ¶
func (x *GetResponse) GetReadAtIndex() uint64
func (*GetResponse) GetValue ¶
func (x *GetResponse) GetValue() []byte
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type InternalClient ¶
type InternalClient interface { // for internal leader redirect only Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*ForwardResponse, error) }
InternalClient is the client API for Internal 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.
func NewInternalClient ¶
func NewInternalClient(cc grpc.ClientConnInterface) InternalClient
type InternalServer ¶
type InternalServer interface { // for internal leader redirect only Forward(context.Context, *ForwardRequest) (*ForwardResponse, error) // contains filtered or unexported methods }
InternalServer is the server API for Internal service. All implementations must embed UnimplementedInternalServer for forward compatibility
type KeyError ¶
type KeyError struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Retryable bool `protobuf:"varint,2,opt,name=retryable,proto3" json:"retryable,omitempty"` // contains filtered or unexported fields }
func (*KeyError) Descriptor
deprecated
func (*KeyError) GetMessage ¶
func (*KeyError) GetRetryable ¶
func (*KeyError) ProtoMessage ¶
func (*KeyError) ProtoMessage()
func (*KeyError) ProtoReflect ¶
func (x *KeyError) ProtoReflect() protoreflect.Message
type Kv ¶
type Kv struct { Error *KeyError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Kv) Descriptor
deprecated
func (*Kv) ProtoMessage ¶
func (*Kv) ProtoMessage()
func (*Kv) ProtoReflect ¶
func (x *Kv) ProtoReflect() protoreflect.Message
type Mutation ¶
type Mutation struct { Op Op `protobuf:"varint,1,opt,name=op,proto3,enum=Op" json:"op,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Mutation) Descriptor
deprecated
func (*Mutation) ProtoMessage ¶
func (*Mutation) ProtoMessage()
func (*Mutation) ProtoReflect ¶
func (x *Mutation) ProtoReflect() protoreflect.Message
type Op ¶
type Op int32
internal.proto is node to node communication message in raft replication.
func (Op) Descriptor ¶
func (Op) Descriptor() protoreflect.EnumDescriptor
func (Op) EnumDescriptor
deprecated
func (Op) Number ¶
func (x Op) Number() protoreflect.EnumNumber
func (Op) Type ¶
func (Op) Type() protoreflect.EnumType
type Phase ¶
type Phase int32
func (Phase) Descriptor ¶
func (Phase) Descriptor() protoreflect.EnumDescriptor
func (Phase) EnumDescriptor
deprecated
func (Phase) Number ¶
func (x Phase) Number() protoreflect.EnumNumber
func (Phase) Type ¶
func (Phase) Type() protoreflect.EnumType
type PreCommitResponse ¶
type PreCommitResponse struct { Errors []*KeyError `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` // contains filtered or unexported fields }
func (*PreCommitResponse) Descriptor
deprecated
func (*PreCommitResponse) Descriptor() ([]byte, []int)
Deprecated: Use PreCommitResponse.ProtoReflect.Descriptor instead.
func (*PreCommitResponse) GetErrors ¶
func (x *PreCommitResponse) GetErrors() []*KeyError
func (*PreCommitResponse) ProtoMessage ¶
func (*PreCommitResponse) ProtoMessage()
func (*PreCommitResponse) ProtoReflect ¶
func (x *PreCommitResponse) ProtoReflect() protoreflect.Message
func (*PreCommitResponse) Reset ¶
func (x *PreCommitResponse) Reset()
func (*PreCommitResponse) String ¶
func (x *PreCommitResponse) String() string
type PreWriteRequest ¶
type PreWriteRequest struct { // mutations is the list of mutations to apply atomically. Mutations []*Kv `protobuf:"bytes,2,rep,name=mutations,proto3" json:"mutations,omitempty"` // start_ts is the timestamp of the transaction. StartTs uint64 `protobuf:"varint,3,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"` // lock_ttl is the TTL of the lock in milliseconds. LockTtl uint64 `protobuf:"varint,4,opt,name=lock_ttl,json=lockTtl,proto3" json:"lock_ttl,omitempty"` // contains filtered or unexported fields }
func (*PreWriteRequest) Descriptor
deprecated
func (*PreWriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use PreWriteRequest.ProtoReflect.Descriptor instead.
func (*PreWriteRequest) GetLockTtl ¶
func (x *PreWriteRequest) GetLockTtl() uint64
func (*PreWriteRequest) GetMutations ¶
func (x *PreWriteRequest) GetMutations() []*Kv
func (*PreWriteRequest) GetStartTs ¶
func (x *PreWriteRequest) GetStartTs() uint64
func (*PreWriteRequest) ProtoMessage ¶
func (*PreWriteRequest) ProtoMessage()
func (*PreWriteRequest) ProtoReflect ¶
func (x *PreWriteRequest) ProtoReflect() protoreflect.Message
func (*PreWriteRequest) Reset ¶
func (x *PreWriteRequest) Reset()
func (*PreWriteRequest) String ¶
func (x *PreWriteRequest) String() string
type PutRequest ¶
type PutRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*PutRequest) Descriptor
deprecated
func (*PutRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.
func (*PutRequest) GetKey ¶
func (x *PutRequest) GetKey() []byte
func (*PutRequest) GetValue ¶
func (x *PutRequest) GetValue() []byte
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) ProtoReflect ¶
func (x *PutRequest) ProtoReflect() protoreflect.Message
func (*PutRequest) Reset ¶
func (x *PutRequest) Reset()
func (*PutRequest) String ¶
func (x *PutRequest) String() string
type PutResponse ¶
type PutResponse struct { CommitIndex uint64 `protobuf:"varint,1,opt,name=commit_index,json=commitIndex,proto3" json:"commit_index,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*PutResponse) Descriptor
deprecated
func (*PutResponse) Descriptor() ([]byte, []int)
Deprecated: Use PutResponse.ProtoReflect.Descriptor instead.
func (*PutResponse) GetCommitIndex ¶
func (x *PutResponse) GetCommitIndex() uint64
func (*PutResponse) GetSuccess ¶
func (x *PutResponse) GetSuccess() bool
func (*PutResponse) ProtoMessage ¶
func (*PutResponse) ProtoMessage()
func (*PutResponse) ProtoReflect ¶
func (x *PutResponse) ProtoReflect() protoreflect.Message
func (*PutResponse) Reset ¶
func (x *PutResponse) Reset()
func (*PutResponse) String ¶
func (x *PutResponse) String() string
type RawDeleteRequest ¶
type RawDeleteRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*RawDeleteRequest) Descriptor
deprecated
func (*RawDeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use RawDeleteRequest.ProtoReflect.Descriptor instead.
func (*RawDeleteRequest) GetKey ¶
func (x *RawDeleteRequest) GetKey() []byte
func (*RawDeleteRequest) ProtoMessage ¶
func (*RawDeleteRequest) ProtoMessage()
func (*RawDeleteRequest) ProtoReflect ¶
func (x *RawDeleteRequest) ProtoReflect() protoreflect.Message
func (*RawDeleteRequest) Reset ¶
func (x *RawDeleteRequest) Reset()
func (*RawDeleteRequest) String ¶
func (x *RawDeleteRequest) String() string
type RawDeleteResponse ¶
type RawDeleteResponse struct { CommitIndex uint64 `protobuf:"varint,1,opt,name=commit_index,json=commitIndex,proto3" json:"commit_index,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*RawDeleteResponse) Descriptor
deprecated
func (*RawDeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use RawDeleteResponse.ProtoReflect.Descriptor instead.
func (*RawDeleteResponse) GetCommitIndex ¶
func (x *RawDeleteResponse) GetCommitIndex() uint64
func (*RawDeleteResponse) GetSuccess ¶
func (x *RawDeleteResponse) GetSuccess() bool
func (*RawDeleteResponse) ProtoMessage ¶
func (*RawDeleteResponse) ProtoMessage()
func (*RawDeleteResponse) ProtoReflect ¶
func (x *RawDeleteResponse) ProtoReflect() protoreflect.Message
func (*RawDeleteResponse) Reset ¶
func (x *RawDeleteResponse) Reset()
func (*RawDeleteResponse) String ¶
func (x *RawDeleteResponse) String() string
type RawGetRequest ¶
type RawGetRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*RawGetRequest) Descriptor
deprecated
func (*RawGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use RawGetRequest.ProtoReflect.Descriptor instead.
func (*RawGetRequest) GetKey ¶
func (x *RawGetRequest) GetKey() []byte
func (*RawGetRequest) ProtoMessage ¶
func (*RawGetRequest) ProtoMessage()
func (*RawGetRequest) ProtoReflect ¶
func (x *RawGetRequest) ProtoReflect() protoreflect.Message
func (*RawGetRequest) Reset ¶
func (x *RawGetRequest) Reset()
func (*RawGetRequest) String ¶
func (x *RawGetRequest) String() string
type RawGetResponse ¶
type RawGetResponse struct { ReadAtIndex uint64 `protobuf:"varint,1,opt,name=read_at_index,json=readAtIndex,proto3" json:"read_at_index,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*RawGetResponse) Descriptor
deprecated
func (*RawGetResponse) Descriptor() ([]byte, []int)
Deprecated: Use RawGetResponse.ProtoReflect.Descriptor instead.
func (*RawGetResponse) GetReadAtIndex ¶
func (x *RawGetResponse) GetReadAtIndex() uint64
func (*RawGetResponse) GetValue ¶
func (x *RawGetResponse) GetValue() []byte
func (*RawGetResponse) ProtoMessage ¶
func (*RawGetResponse) ProtoMessage()
func (*RawGetResponse) ProtoReflect ¶
func (x *RawGetResponse) ProtoReflect() protoreflect.Message
func (*RawGetResponse) Reset ¶
func (x *RawGetResponse) Reset()
func (*RawGetResponse) String ¶
func (x *RawGetResponse) String() string
type RawKVClient ¶
type RawKVClient interface { RawPut(ctx context.Context, in *RawPutRequest, opts ...grpc.CallOption) (*RawPutResponse, error) RawGet(ctx context.Context, in *RawGetRequest, opts ...grpc.CallOption) (*RawGetResponse, error) RawDelete(ctx context.Context, in *RawDeleteRequest, opts ...grpc.CallOption) (*RawDeleteResponse, error) }
RawKVClient is the client API for RawKV 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.
func NewRawKVClient ¶
func NewRawKVClient(cc grpc.ClientConnInterface) RawKVClient
type RawKVServer ¶
type RawKVServer interface { RawPut(context.Context, *RawPutRequest) (*RawPutResponse, error) RawGet(context.Context, *RawGetRequest) (*RawGetResponse, error) RawDelete(context.Context, *RawDeleteRequest) (*RawDeleteResponse, error) // contains filtered or unexported methods }
RawKVServer is the server API for RawKV service. All implementations must embed UnimplementedRawKVServer for forward compatibility
type RawPutRequest ¶
type RawPutRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*RawPutRequest) Descriptor
deprecated
func (*RawPutRequest) Descriptor() ([]byte, []int)
Deprecated: Use RawPutRequest.ProtoReflect.Descriptor instead.
func (*RawPutRequest) GetKey ¶
func (x *RawPutRequest) GetKey() []byte
func (*RawPutRequest) GetValue ¶
func (x *RawPutRequest) GetValue() []byte
func (*RawPutRequest) ProtoMessage ¶
func (*RawPutRequest) ProtoMessage()
func (*RawPutRequest) ProtoReflect ¶
func (x *RawPutRequest) ProtoReflect() protoreflect.Message
func (*RawPutRequest) Reset ¶
func (x *RawPutRequest) Reset()
func (*RawPutRequest) String ¶
func (x *RawPutRequest) String() string
type RawPutResponse ¶
type RawPutResponse struct { CommitIndex uint64 `protobuf:"varint,1,opt,name=commit_index,json=commitIndex,proto3" json:"commit_index,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*RawPutResponse) Descriptor
deprecated
func (*RawPutResponse) Descriptor() ([]byte, []int)
Deprecated: Use RawPutResponse.ProtoReflect.Descriptor instead.
func (*RawPutResponse) GetCommitIndex ¶
func (x *RawPutResponse) GetCommitIndex() uint64
func (*RawPutResponse) GetSuccess ¶
func (x *RawPutResponse) GetSuccess() bool
func (*RawPutResponse) ProtoMessage ¶
func (*RawPutResponse) ProtoMessage()
func (*RawPutResponse) ProtoReflect ¶
func (x *RawPutResponse) ProtoReflect() protoreflect.Message
func (*RawPutResponse) Reset ¶
func (x *RawPutResponse) Reset()
func (*RawPutResponse) String ¶
func (x *RawPutResponse) String() string
type Request ¶
type Request struct { IsTxn bool `protobuf:"varint,1,opt,name=is_txn,json=isTxn,proto3" json:"is_txn,omitempty"` Phase Phase `protobuf:"varint,2,opt,name=phase,proto3,enum=Phase" json:"phase,omitempty"` Ts uint64 `protobuf:"varint,3,opt,name=ts,proto3" json:"ts,omitempty"` Mutations []*Mutation `protobuf:"bytes,4,rep,name=mutations,proto3" json:"mutations,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetMutations ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type RollbackRequest ¶
type RollbackRequest struct { StartTs uint64 `protobuf:"varint,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"` // contains filtered or unexported fields }
func (*RollbackRequest) Descriptor
deprecated
func (*RollbackRequest) Descriptor() ([]byte, []int)
Deprecated: Use RollbackRequest.ProtoReflect.Descriptor instead.
func (*RollbackRequest) GetStartTs ¶
func (x *RollbackRequest) GetStartTs() uint64
func (*RollbackRequest) ProtoMessage ¶
func (*RollbackRequest) ProtoMessage()
func (*RollbackRequest) ProtoReflect ¶
func (x *RollbackRequest) ProtoReflect() protoreflect.Message
func (*RollbackRequest) Reset ¶
func (x *RollbackRequest) Reset()
func (*RollbackRequest) String ¶
func (x *RollbackRequest) String() string
type RollbackResponse ¶
type RollbackResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*RollbackResponse) Descriptor
deprecated
func (*RollbackResponse) Descriptor() ([]byte, []int)
Deprecated: Use RollbackResponse.ProtoReflect.Descriptor instead.
func (*RollbackResponse) GetSuccess ¶
func (x *RollbackResponse) GetSuccess() bool
func (*RollbackResponse) ProtoMessage ¶
func (*RollbackResponse) ProtoMessage()
func (*RollbackResponse) ProtoReflect ¶
func (x *RollbackResponse) ProtoReflect() protoreflect.Message
func (*RollbackResponse) Reset ¶
func (x *RollbackResponse) Reset()
func (*RollbackResponse) String ¶
func (x *RollbackResponse) String() string
type ScanRequest ¶
type ScanRequest struct { StartKey []byte `protobuf:"bytes,1,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"` EndKey []byte `protobuf:"bytes,2,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` Limit uint64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*ScanRequest) Descriptor
deprecated
func (*ScanRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.
func (*ScanRequest) GetEndKey ¶
func (x *ScanRequest) GetEndKey() []byte
func (*ScanRequest) GetLimit ¶
func (x *ScanRequest) GetLimit() uint64
func (*ScanRequest) GetStartKey ¶
func (x *ScanRequest) GetStartKey() []byte
func (*ScanRequest) ProtoMessage ¶
func (*ScanRequest) ProtoMessage()
func (*ScanRequest) ProtoReflect ¶
func (x *ScanRequest) ProtoReflect() protoreflect.Message
func (*ScanRequest) Reset ¶
func (x *ScanRequest) Reset()
func (*ScanRequest) String ¶
func (x *ScanRequest) String() string
type ScanResponse ¶
type ScanResponse struct { Kv []*Kv `protobuf:"bytes,1,rep,name=kv,proto3" json:"kv,omitempty"` // contains filtered or unexported fields }
func (*ScanResponse) Descriptor
deprecated
func (*ScanResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScanResponse.ProtoReflect.Descriptor instead.
func (*ScanResponse) GetKv ¶
func (x *ScanResponse) GetKv() []*Kv
func (*ScanResponse) ProtoMessage ¶
func (*ScanResponse) ProtoMessage()
func (*ScanResponse) ProtoReflect ¶
func (x *ScanResponse) ProtoReflect() protoreflect.Message
func (*ScanResponse) Reset ¶
func (x *ScanResponse) Reset()
func (*ScanResponse) String ¶
func (x *ScanResponse) String() string
type TransactionalKVClient ¶
type TransactionalKVClient interface { Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (*ScanResponse, error) PreWrite(ctx context.Context, in *PreWriteRequest, opts ...grpc.CallOption) (*PreCommitResponse, error) Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error) Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*RollbackResponse, error) }
TransactionalKVClient is the client API for TransactionalKV 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.
func NewTransactionalKVClient ¶
func NewTransactionalKVClient(cc grpc.ClientConnInterface) TransactionalKVClient
type TransactionalKVServer ¶
type TransactionalKVServer interface { Put(context.Context, *PutRequest) (*PutResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) Scan(context.Context, *ScanRequest) (*ScanResponse, error) PreWrite(context.Context, *PreWriteRequest) (*PreCommitResponse, error) Commit(context.Context, *CommitRequest) (*CommitResponse, error) Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error) // contains filtered or unexported methods }
TransactionalKVServer is the server API for TransactionalKV service. All implementations must embed UnimplementedTransactionalKVServer for forward compatibility
type UnimplementedInternalServer ¶
type UnimplementedInternalServer struct { }
UnimplementedInternalServer must be embedded to have forward compatible implementations.
func (UnimplementedInternalServer) Forward ¶
func (UnimplementedInternalServer) Forward(context.Context, *ForwardRequest) (*ForwardResponse, error)
type UnimplementedRawKVServer ¶
type UnimplementedRawKVServer struct { }
UnimplementedRawKVServer must be embedded to have forward compatible implementations.
func (UnimplementedRawKVServer) RawDelete ¶
func (UnimplementedRawKVServer) RawDelete(context.Context, *RawDeleteRequest) (*RawDeleteResponse, error)
func (UnimplementedRawKVServer) RawGet ¶
func (UnimplementedRawKVServer) RawGet(context.Context, *RawGetRequest) (*RawGetResponse, error)
func (UnimplementedRawKVServer) RawPut ¶
func (UnimplementedRawKVServer) RawPut(context.Context, *RawPutRequest) (*RawPutResponse, error)
type UnimplementedTransactionalKVServer ¶
type UnimplementedTransactionalKVServer struct { }
UnimplementedTransactionalKVServer must be embedded to have forward compatible implementations.
func (UnimplementedTransactionalKVServer) Commit ¶
func (UnimplementedTransactionalKVServer) Commit(context.Context, *CommitRequest) (*CommitResponse, error)
func (UnimplementedTransactionalKVServer) Delete ¶
func (UnimplementedTransactionalKVServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedTransactionalKVServer) Get ¶
func (UnimplementedTransactionalKVServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedTransactionalKVServer) PreWrite ¶
func (UnimplementedTransactionalKVServer) PreWrite(context.Context, *PreWriteRequest) (*PreCommitResponse, error)
func (UnimplementedTransactionalKVServer) Put ¶
func (UnimplementedTransactionalKVServer) Put(context.Context, *PutRequest) (*PutResponse, error)
func (UnimplementedTransactionalKVServer) Rollback ¶
func (UnimplementedTransactionalKVServer) Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)
func (UnimplementedTransactionalKVServer) Scan ¶
func (UnimplementedTransactionalKVServer) Scan(context.Context, *ScanRequest) (*ScanResponse, error)
type UnsafeInternalServer ¶
type UnsafeInternalServer interface {
// contains filtered or unexported methods
}
UnsafeInternalServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternalServer will result in compilation errors.
type UnsafeRawKVServer ¶
type UnsafeRawKVServer interface {
// contains filtered or unexported methods
}
UnsafeRawKVServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RawKVServer will result in compilation errors.
type UnsafeTransactionalKVServer ¶
type UnsafeTransactionalKVServer interface {
// contains filtered or unexported methods
}
UnsafeTransactionalKVServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransactionalKVServer will result in compilation errors.