Documentation ¶
Index ¶
- Variables
- func RegisterTxnServiceServer(s *grpc.Server, srv TxnServiceServer)
- type BeginRequest
- type BeginResponse
- func (*BeginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BeginResponse) GetErr() *commonpb.Error
- func (x *BeginResponse) GetTxn() *Txn
- func (*BeginResponse) ProtoMessage()
- func (x *BeginResponse) ProtoReflect() protoreflect.Message
- func (x *BeginResponse) Reset()
- func (x *BeginResponse) String() string
- type CommitRequest
- type CommitResponse
- func (*CommitResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CommitResponse) GetErr() *commonpb.Error
- func (x *CommitResponse) GetTxn() *Txn
- func (*CommitResponse) ProtoMessage()
- func (x *CommitResponse) ProtoReflect() protoreflect.Message
- func (x *CommitResponse) Reset()
- func (x *CommitResponse) String() string
- type RollbackRequest
- type RollbackResponse
- func (*RollbackResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RollbackResponse) GetErr() *commonpb.Error
- func (x *RollbackResponse) GetTxn() *Txn
- func (*RollbackResponse) ProtoMessage()
- func (x *RollbackResponse) ProtoReflect() protoreflect.Message
- func (x *RollbackResponse) Reset()
- func (x *RollbackResponse) String() string
- type TValue
- func (*TValue) Descriptor() ([]byte, []int)deprecated
- func (x *TValue) GetSnapshotVersion() uint64
- func (x *TValue) GetValue() *commonpb.Value
- func (*TValue) ProtoMessage()
- func (x *TValue) ProtoReflect() protoreflect.Message
- func (x *TValue) Reset()
- func (x *TValue) String() string
- func (x *TValue) Validate() error
- type TValues
- type Txn
- func (*Txn) Descriptor() ([]byte, []int)deprecated
- func (x *Txn) GetId() uint64
- func (x *Txn) GetSnapshotReadOption() *TxnSnapshotReadOption
- func (x *Txn) GetState() TxnState
- func (x *Txn) GetType() uint32
- func (*Txn) ProtoMessage()
- func (x *Txn) ProtoReflect() protoreflect.Message
- func (x *Txn) Reset()
- func (x *Txn) String() string
- type TxnGetRequest
- func (*TxnGetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TxnGetRequest) GetKey() string
- func (x *TxnGetRequest) GetTxnId() uint64
- func (*TxnGetRequest) ProtoMessage()
- func (x *TxnGetRequest) ProtoReflect() protoreflect.Message
- func (x *TxnGetRequest) Reset()
- func (x *TxnGetRequest) String() string
- type TxnGetResponse
- func (*TxnGetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TxnGetResponse) GetErr() *commonpb.Error
- func (x *TxnGetResponse) GetTValue() *TValue
- func (x *TxnGetResponse) GetTxn() *Txn
- func (*TxnGetResponse) ProtoMessage()
- func (x *TxnGetResponse) ProtoReflect() protoreflect.Message
- func (x *TxnGetResponse) Reset()
- func (x *TxnGetResponse) String() string
- type TxnMGetRequest
- func (*TxnMGetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TxnMGetRequest) GetKeys() []string
- func (x *TxnMGetRequest) GetTxnId() uint64
- func (*TxnMGetRequest) ProtoMessage()
- func (x *TxnMGetRequest) ProtoReflect() protoreflect.Message
- func (x *TxnMGetRequest) Reset()
- func (x *TxnMGetRequest) String() string
- type TxnMGetResponse
- func (*TxnMGetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TxnMGetResponse) GetErr() *commonpb.Error
- func (x *TxnMGetResponse) GetTValues() []*TValue
- func (x *TxnMGetResponse) GetTxn() *Txn
- func (*TxnMGetResponse) ProtoMessage()
- func (x *TxnMGetResponse) ProtoReflect() protoreflect.Message
- func (x *TxnMGetResponse) Reset()
- func (x *TxnMGetResponse) String() string
- type TxnMSetRequest
- func (*TxnMSetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TxnMSetRequest) GetKeys() []string
- func (x *TxnMSetRequest) GetTxnId() uint64
- func (x *TxnMSetRequest) GetValues() [][]byte
- func (*TxnMSetRequest) ProtoMessage()
- func (x *TxnMSetRequest) ProtoReflect() protoreflect.Message
- func (x *TxnMSetRequest) Reset()
- func (x *TxnMSetRequest) String() string
- type TxnMSetResponse
- func (*TxnMSetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TxnMSetResponse) GetErr() *commonpb.Error
- func (x *TxnMSetResponse) GetTxn() *Txn
- func (*TxnMSetResponse) ProtoMessage()
- func (x *TxnMSetResponse) ProtoReflect() protoreflect.Message
- func (x *TxnMSetResponse) Reset()
- func (x *TxnMSetResponse) String() string
- type TxnOption
- func (*TxnOption) Descriptor() ([]byte, []int)deprecated
- func (x *TxnOption) GetSnapshotReadOption() *TxnSnapshotReadOption
- func (x *TxnOption) GetTxnType() uint8
- func (x *TxnOption) GetType() uint32
- func (*TxnOption) ProtoMessage()
- func (x *TxnOption) ProtoReflect() protoreflect.Message
- func (x *TxnOption) Reset()
- func (x *TxnOption) String() string
- type TxnServiceClient
- type TxnServiceServer
- type TxnSetRequest
- func (*TxnSetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TxnSetRequest) GetKey() string
- func (x *TxnSetRequest) GetTxnId() uint64
- func (x *TxnSetRequest) GetValue() []byte
- func (*TxnSetRequest) ProtoMessage()
- func (x *TxnSetRequest) ProtoReflect() protoreflect.Message
- func (x *TxnSetRequest) Reset()
- func (x *TxnSetRequest) String() string
- type TxnSetResponse
- func (*TxnSetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TxnSetResponse) GetErr() *commonpb.Error
- func (x *TxnSetResponse) GetTxn() *Txn
- func (*TxnSetResponse) ProtoMessage()
- func (x *TxnSetResponse) ProtoReflect() protoreflect.Message
- func (x *TxnSetResponse) Reset()
- func (x *TxnSetResponse) String() string
- type TxnSnapshotReadOption
- func (*TxnSnapshotReadOption) Descriptor() ([]byte, []int)deprecated
- func (x *TxnSnapshotReadOption) GetFlag() uint32
- func (x *TxnSnapshotReadOption) GetFlagAsUint8() uint8
- func (x *TxnSnapshotReadOption) GetMinAllowedSnapshotVersion() uint64
- func (x *TxnSnapshotReadOption) GetSnapshotVersion() uint64
- func (*TxnSnapshotReadOption) ProtoMessage()
- func (x *TxnSnapshotReadOption) ProtoReflect() protoreflect.Message
- func (x *TxnSnapshotReadOption) Reset()
- func (x *TxnSnapshotReadOption) String() string
- type TxnState
- type UnimplementedTxnServiceServer
- func (*UnimplementedTxnServiceServer) Begin(context.Context, *BeginRequest) (*BeginResponse, error)
- func (*UnimplementedTxnServiceServer) Commit(context.Context, *CommitRequest) (*CommitResponse, error)
- func (*UnimplementedTxnServiceServer) Get(context.Context, *TxnGetRequest) (*TxnGetResponse, error)
- func (*UnimplementedTxnServiceServer) MGet(context.Context, *TxnMGetRequest) (*TxnMGetResponse, error)
- func (*UnimplementedTxnServiceServer) MSet(context.Context, *TxnMSetRequest) (*TxnMSetResponse, error)
- func (*UnimplementedTxnServiceServer) Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)
- func (*UnimplementedTxnServiceServer) Set(context.Context, *TxnSetRequest) (*TxnSetResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( TxnState_name = map[int32]string{ 0: "StateInvalid", 1: "StateUncommitted", 2: "StateStaging", 3: "StateCommitted", 4: "StateRollbacking", 5: "StateRollbacked", } TxnState_value = map[string]int32{ "StateInvalid": 0, "StateUncommitted": 1, "StateStaging": 2, "StateCommitted": 3, "StateRollbacking": 4, "StateRollbacked": 5, } )
Enum value maps for TxnState.
var File_txn_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTxnServiceServer ¶
func RegisterTxnServiceServer(s *grpc.Server, srv TxnServiceServer)
Types ¶
type BeginRequest ¶
type BeginRequest struct { Opt *TxnOption `protobuf:"bytes,1,opt,name=opt,proto3" json:"opt,omitempty"` // contains filtered or unexported fields }
func (*BeginRequest) Descriptor
deprecated
func (*BeginRequest) Descriptor() ([]byte, []int)
Deprecated: Use BeginRequest.ProtoReflect.Descriptor instead.
func (*BeginRequest) GetOpt ¶
func (x *BeginRequest) GetOpt() *TxnOption
func (*BeginRequest) ProtoMessage ¶
func (*BeginRequest) ProtoMessage()
func (*BeginRequest) ProtoReflect ¶
func (x *BeginRequest) ProtoReflect() protoreflect.Message
func (*BeginRequest) Reset ¶
func (x *BeginRequest) Reset()
func (*BeginRequest) String ¶
func (x *BeginRequest) String() string
type BeginResponse ¶
type BeginResponse struct { Err *commonpb.Error `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Txn *Txn `protobuf:"bytes,2,opt,name=txn,proto3" json:"txn,omitempty"` // contains filtered or unexported fields }
func (*BeginResponse) Descriptor
deprecated
func (*BeginResponse) Descriptor() ([]byte, []int)
Deprecated: Use BeginResponse.ProtoReflect.Descriptor instead.
func (*BeginResponse) GetErr ¶
func (x *BeginResponse) GetErr() *commonpb.Error
func (*BeginResponse) GetTxn ¶
func (x *BeginResponse) GetTxn() *Txn
func (*BeginResponse) ProtoMessage ¶
func (*BeginResponse) ProtoMessage()
func (*BeginResponse) ProtoReflect ¶
func (x *BeginResponse) ProtoReflect() protoreflect.Message
func (*BeginResponse) Reset ¶
func (x *BeginResponse) Reset()
func (*BeginResponse) String ¶
func (x *BeginResponse) String() string
type CommitRequest ¶
type CommitRequest struct { TxnId uint64 `protobuf:"varint,1,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"` // contains filtered or unexported fields }
func (*CommitRequest) Descriptor
deprecated
func (*CommitRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommitRequest.ProtoReflect.Descriptor instead.
func (*CommitRequest) GetTxnId ¶
func (x *CommitRequest) GetTxnId() 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 { Err *commonpb.Error `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Txn *Txn `protobuf:"bytes,2,opt,name=txn,proto3" json:"txn,omitempty"` // contains filtered or unexported fields }
func (*CommitResponse) Descriptor
deprecated
func (*CommitResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommitResponse.ProtoReflect.Descriptor instead.
func (*CommitResponse) GetErr ¶
func (x *CommitResponse) GetErr() *commonpb.Error
func (*CommitResponse) GetTxn ¶
func (x *CommitResponse) GetTxn() *Txn
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 RollbackRequest ¶
type RollbackRequest struct { TxnId uint64 `protobuf:"varint,1,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"` // contains filtered or unexported fields }
func (*RollbackRequest) Descriptor
deprecated
func (*RollbackRequest) Descriptor() ([]byte, []int)
Deprecated: Use RollbackRequest.ProtoReflect.Descriptor instead.
func (*RollbackRequest) GetTxnId ¶
func (x *RollbackRequest) GetTxnId() 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 { Err *commonpb.Error `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Txn *Txn `protobuf:"bytes,2,opt,name=txn,proto3" json:"txn,omitempty"` // contains filtered or unexported fields }
func (*RollbackResponse) Descriptor
deprecated
func (*RollbackResponse) Descriptor() ([]byte, []int)
Deprecated: Use RollbackResponse.ProtoReflect.Descriptor instead.
func (*RollbackResponse) GetErr ¶
func (x *RollbackResponse) GetErr() *commonpb.Error
func (*RollbackResponse) GetTxn ¶
func (x *RollbackResponse) GetTxn() *Txn
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 TValue ¶
type TValue struct { Value *commonpb.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` SnapshotVersion uint64 `protobuf:"varint,2,opt,name=snapshot_version,json=snapshotVersion,proto3" json:"snapshot_version,omitempty"` // contains filtered or unexported fields }
func (*TValue) Descriptor
deprecated
func (*TValue) GetSnapshotVersion ¶
func (*TValue) ProtoMessage ¶
func (*TValue) ProtoMessage()
func (*TValue) ProtoReflect ¶
func (x *TValue) ProtoReflect() protoreflect.Message
type Txn ¶
type Txn struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` State TxnState `protobuf:"varint,3,opt,name=state,proto3,enum=proto.TxnState" json:"state,omitempty"` SnapshotReadOption *TxnSnapshotReadOption `protobuf:"bytes,4,opt,name=snapshot_read_option,json=snapshotReadOption,proto3" json:"snapshot_read_option,omitempty"` // contains filtered or unexported fields }
func (*Txn) Descriptor
deprecated
func (*Txn) GetSnapshotReadOption ¶
func (x *Txn) GetSnapshotReadOption() *TxnSnapshotReadOption
func (*Txn) ProtoMessage ¶
func (*Txn) ProtoMessage()
func (*Txn) ProtoReflect ¶
func (x *Txn) ProtoReflect() protoreflect.Message
type TxnGetRequest ¶
type TxnGetRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` TxnId uint64 `protobuf:"varint,2,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"` // contains filtered or unexported fields }
func (*TxnGetRequest) Descriptor
deprecated
func (*TxnGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use TxnGetRequest.ProtoReflect.Descriptor instead.
func (*TxnGetRequest) GetKey ¶
func (x *TxnGetRequest) GetKey() string
func (*TxnGetRequest) GetTxnId ¶
func (x *TxnGetRequest) GetTxnId() uint64
func (*TxnGetRequest) ProtoMessage ¶
func (*TxnGetRequest) ProtoMessage()
func (*TxnGetRequest) ProtoReflect ¶
func (x *TxnGetRequest) ProtoReflect() protoreflect.Message
func (*TxnGetRequest) Reset ¶
func (x *TxnGetRequest) Reset()
func (*TxnGetRequest) String ¶
func (x *TxnGetRequest) String() string
type TxnGetResponse ¶
type TxnGetResponse struct { Err *commonpb.Error `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` TValue *TValue `protobuf:"bytes,2,opt,name=t_value,json=tValue,proto3" json:"t_value,omitempty"` Txn *Txn `protobuf:"bytes,3,opt,name=txn,proto3" json:"txn,omitempty"` // contains filtered or unexported fields }
func (*TxnGetResponse) Descriptor
deprecated
func (*TxnGetResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxnGetResponse.ProtoReflect.Descriptor instead.
func (*TxnGetResponse) GetErr ¶
func (x *TxnGetResponse) GetErr() *commonpb.Error
func (*TxnGetResponse) GetTValue ¶
func (x *TxnGetResponse) GetTValue() *TValue
func (*TxnGetResponse) GetTxn ¶
func (x *TxnGetResponse) GetTxn() *Txn
func (*TxnGetResponse) ProtoMessage ¶
func (*TxnGetResponse) ProtoMessage()
func (*TxnGetResponse) ProtoReflect ¶
func (x *TxnGetResponse) ProtoReflect() protoreflect.Message
func (*TxnGetResponse) Reset ¶
func (x *TxnGetResponse) Reset()
func (*TxnGetResponse) String ¶
func (x *TxnGetResponse) String() string
type TxnMGetRequest ¶
type TxnMGetRequest struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` TxnId uint64 `protobuf:"varint,2,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"` // contains filtered or unexported fields }
func (*TxnMGetRequest) Descriptor
deprecated
func (*TxnMGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use TxnMGetRequest.ProtoReflect.Descriptor instead.
func (*TxnMGetRequest) GetKeys ¶
func (x *TxnMGetRequest) GetKeys() []string
func (*TxnMGetRequest) GetTxnId ¶
func (x *TxnMGetRequest) GetTxnId() uint64
func (*TxnMGetRequest) ProtoMessage ¶
func (*TxnMGetRequest) ProtoMessage()
func (*TxnMGetRequest) ProtoReflect ¶
func (x *TxnMGetRequest) ProtoReflect() protoreflect.Message
func (*TxnMGetRequest) Reset ¶
func (x *TxnMGetRequest) Reset()
func (*TxnMGetRequest) String ¶
func (x *TxnMGetRequest) String() string
type TxnMGetResponse ¶
type TxnMGetResponse struct { Err *commonpb.Error `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` TValues []*TValue `protobuf:"bytes,2,rep,name=t_values,json=tValues,proto3" json:"t_values,omitempty"` Txn *Txn `protobuf:"bytes,3,opt,name=txn,proto3" json:"txn,omitempty"` // contains filtered or unexported fields }
func (*TxnMGetResponse) Descriptor
deprecated
func (*TxnMGetResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxnMGetResponse.ProtoReflect.Descriptor instead.
func (*TxnMGetResponse) GetErr ¶
func (x *TxnMGetResponse) GetErr() *commonpb.Error
func (*TxnMGetResponse) GetTValues ¶
func (x *TxnMGetResponse) GetTValues() []*TValue
func (*TxnMGetResponse) GetTxn ¶
func (x *TxnMGetResponse) GetTxn() *Txn
func (*TxnMGetResponse) ProtoMessage ¶
func (*TxnMGetResponse) ProtoMessage()
func (*TxnMGetResponse) ProtoReflect ¶
func (x *TxnMGetResponse) ProtoReflect() protoreflect.Message
func (*TxnMGetResponse) Reset ¶
func (x *TxnMGetResponse) Reset()
func (*TxnMGetResponse) String ¶
func (x *TxnMGetResponse) String() string
type TxnMSetRequest ¶
type TxnMSetRequest struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` Values [][]byte `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` TxnId uint64 `protobuf:"varint,3,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"` // contains filtered or unexported fields }
func (*TxnMSetRequest) Descriptor
deprecated
func (*TxnMSetRequest) Descriptor() ([]byte, []int)
Deprecated: Use TxnMSetRequest.ProtoReflect.Descriptor instead.
func (*TxnMSetRequest) GetKeys ¶
func (x *TxnMSetRequest) GetKeys() []string
func (*TxnMSetRequest) GetTxnId ¶
func (x *TxnMSetRequest) GetTxnId() uint64
func (*TxnMSetRequest) GetValues ¶
func (x *TxnMSetRequest) GetValues() [][]byte
func (*TxnMSetRequest) ProtoMessage ¶
func (*TxnMSetRequest) ProtoMessage()
func (*TxnMSetRequest) ProtoReflect ¶
func (x *TxnMSetRequest) ProtoReflect() protoreflect.Message
func (*TxnMSetRequest) Reset ¶
func (x *TxnMSetRequest) Reset()
func (*TxnMSetRequest) String ¶
func (x *TxnMSetRequest) String() string
type TxnMSetResponse ¶
type TxnMSetResponse struct { Err *commonpb.Error `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Txn *Txn `protobuf:"bytes,2,opt,name=txn,proto3" json:"txn,omitempty"` // contains filtered or unexported fields }
func (*TxnMSetResponse) Descriptor
deprecated
func (*TxnMSetResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxnMSetResponse.ProtoReflect.Descriptor instead.
func (*TxnMSetResponse) GetErr ¶
func (x *TxnMSetResponse) GetErr() *commonpb.Error
func (*TxnMSetResponse) GetTxn ¶
func (x *TxnMSetResponse) GetTxn() *Txn
func (*TxnMSetResponse) ProtoMessage ¶
func (*TxnMSetResponse) ProtoMessage()
func (*TxnMSetResponse) ProtoReflect ¶
func (x *TxnMSetResponse) ProtoReflect() protoreflect.Message
func (*TxnMSetResponse) Reset ¶
func (x *TxnMSetResponse) Reset()
func (*TxnMSetResponse) String ¶
func (x *TxnMSetResponse) String() string
type TxnOption ¶
type TxnOption struct { Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` SnapshotReadOption *TxnSnapshotReadOption `protobuf:"bytes,2,opt,name=snapshot_read_option,json=snapshotReadOption,proto3" json:"snapshot_read_option,omitempty"` // contains filtered or unexported fields }
func (*TxnOption) Descriptor
deprecated
func (*TxnOption) GetSnapshotReadOption ¶
func (x *TxnOption) GetSnapshotReadOption() *TxnSnapshotReadOption
func (*TxnOption) GetTxnType ¶
func (*TxnOption) ProtoMessage ¶
func (*TxnOption) ProtoMessage()
func (*TxnOption) ProtoReflect ¶
func (x *TxnOption) ProtoReflect() protoreflect.Message
type TxnServiceClient ¶
type TxnServiceClient interface { Begin(ctx context.Context, in *BeginRequest, opts ...grpc.CallOption) (*BeginResponse, error) Get(ctx context.Context, in *TxnGetRequest, opts ...grpc.CallOption) (*TxnGetResponse, error) MGet(ctx context.Context, in *TxnMGetRequest, opts ...grpc.CallOption) (*TxnMGetResponse, error) Set(ctx context.Context, in *TxnSetRequest, opts ...grpc.CallOption) (*TxnSetResponse, error) MSet(ctx context.Context, in *TxnMSetRequest, opts ...grpc.CallOption) (*TxnMSetResponse, error) Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*RollbackResponse, error) Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error) }
TxnServiceClient is the client API for TxnService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTxnServiceClient ¶
func NewTxnServiceClient(cc grpc.ClientConnInterface) TxnServiceClient
type TxnServiceServer ¶
type TxnServiceServer interface { Begin(context.Context, *BeginRequest) (*BeginResponse, error) Get(context.Context, *TxnGetRequest) (*TxnGetResponse, error) MGet(context.Context, *TxnMGetRequest) (*TxnMGetResponse, error) Set(context.Context, *TxnSetRequest) (*TxnSetResponse, error) MSet(context.Context, *TxnMSetRequest) (*TxnMSetResponse, error) Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error) Commit(context.Context, *CommitRequest) (*CommitResponse, error) }
TxnServiceServer is the server API for TxnService service.
type TxnSetRequest ¶
type TxnSetRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` TxnId uint64 `protobuf:"varint,3,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"` // contains filtered or unexported fields }
func (*TxnSetRequest) Descriptor
deprecated
func (*TxnSetRequest) Descriptor() ([]byte, []int)
Deprecated: Use TxnSetRequest.ProtoReflect.Descriptor instead.
func (*TxnSetRequest) GetKey ¶
func (x *TxnSetRequest) GetKey() string
func (*TxnSetRequest) GetTxnId ¶
func (x *TxnSetRequest) GetTxnId() uint64
func (*TxnSetRequest) GetValue ¶
func (x *TxnSetRequest) GetValue() []byte
func (*TxnSetRequest) ProtoMessage ¶
func (*TxnSetRequest) ProtoMessage()
func (*TxnSetRequest) ProtoReflect ¶
func (x *TxnSetRequest) ProtoReflect() protoreflect.Message
func (*TxnSetRequest) Reset ¶
func (x *TxnSetRequest) Reset()
func (*TxnSetRequest) String ¶
func (x *TxnSetRequest) String() string
type TxnSetResponse ¶
type TxnSetResponse struct { Err *commonpb.Error `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Txn *Txn `protobuf:"bytes,2,opt,name=txn,proto3" json:"txn,omitempty"` // contains filtered or unexported fields }
func (*TxnSetResponse) Descriptor
deprecated
func (*TxnSetResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxnSetResponse.ProtoReflect.Descriptor instead.
func (*TxnSetResponse) GetErr ¶
func (x *TxnSetResponse) GetErr() *commonpb.Error
func (*TxnSetResponse) GetTxn ¶
func (x *TxnSetResponse) GetTxn() *Txn
func (*TxnSetResponse) ProtoMessage ¶
func (*TxnSetResponse) ProtoMessage()
func (*TxnSetResponse) ProtoReflect ¶
func (x *TxnSetResponse) ProtoReflect() protoreflect.Message
func (*TxnSetResponse) Reset ¶
func (x *TxnSetResponse) Reset()
func (*TxnSetResponse) String ¶
func (x *TxnSetResponse) String() string
type TxnSnapshotReadOption ¶
type TxnSnapshotReadOption struct { SnapshotVersion uint64 `protobuf:"varint,1,opt,name=snapshot_version,json=snapshotVersion,proto3" json:"snapshot_version,omitempty"` MinAllowedSnapshotVersion uint64 `` /* 141-byte string literal not displayed */ Flag uint32 `protobuf:"varint,3,opt,name=flag,proto3" json:"flag,omitempty"` // contains filtered or unexported fields }
func (*TxnSnapshotReadOption) Descriptor
deprecated
func (*TxnSnapshotReadOption) Descriptor() ([]byte, []int)
Deprecated: Use TxnSnapshotReadOption.ProtoReflect.Descriptor instead.
func (*TxnSnapshotReadOption) GetFlag ¶
func (x *TxnSnapshotReadOption) GetFlag() uint32
func (*TxnSnapshotReadOption) GetFlagAsUint8 ¶
func (x *TxnSnapshotReadOption) GetFlagAsUint8() uint8
func (*TxnSnapshotReadOption) GetMinAllowedSnapshotVersion ¶
func (x *TxnSnapshotReadOption) GetMinAllowedSnapshotVersion() uint64
func (*TxnSnapshotReadOption) GetSnapshotVersion ¶
func (x *TxnSnapshotReadOption) GetSnapshotVersion() uint64
func (*TxnSnapshotReadOption) ProtoMessage ¶
func (*TxnSnapshotReadOption) ProtoMessage()
func (*TxnSnapshotReadOption) ProtoReflect ¶
func (x *TxnSnapshotReadOption) ProtoReflect() protoreflect.Message
func (*TxnSnapshotReadOption) Reset ¶
func (x *TxnSnapshotReadOption) Reset()
func (*TxnSnapshotReadOption) String ¶
func (x *TxnSnapshotReadOption) String() string
type TxnState ¶
type TxnState int32
func (TxnState) Descriptor ¶
func (TxnState) Descriptor() protoreflect.EnumDescriptor
func (TxnState) EnumDescriptor
deprecated
func (TxnState) Number ¶
func (x TxnState) Number() protoreflect.EnumNumber
func (TxnState) Type ¶
func (TxnState) Type() protoreflect.EnumType
type UnimplementedTxnServiceServer ¶
type UnimplementedTxnServiceServer struct { }
UnimplementedTxnServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTxnServiceServer) Begin ¶
func (*UnimplementedTxnServiceServer) Begin(context.Context, *BeginRequest) (*BeginResponse, error)
func (*UnimplementedTxnServiceServer) Commit ¶
func (*UnimplementedTxnServiceServer) Commit(context.Context, *CommitRequest) (*CommitResponse, error)
func (*UnimplementedTxnServiceServer) Get ¶
func (*UnimplementedTxnServiceServer) Get(context.Context, *TxnGetRequest) (*TxnGetResponse, error)
func (*UnimplementedTxnServiceServer) MGet ¶
func (*UnimplementedTxnServiceServer) MGet(context.Context, *TxnMGetRequest) (*TxnMGetResponse, error)
func (*UnimplementedTxnServiceServer) MSet ¶
func (*UnimplementedTxnServiceServer) MSet(context.Context, *TxnMSetRequest) (*TxnMSetResponse, error)
func (*UnimplementedTxnServiceServer) Rollback ¶
func (*UnimplementedTxnServiceServer) Rollback(context.Context, *RollbackRequest) (*RollbackResponse, error)
func (*UnimplementedTxnServiceServer) Set ¶
func (*UnimplementedTxnServiceServer) Set(context.Context, *TxnSetRequest) (*TxnSetResponse, error)