Documentation
¶
Overview ¶
Package etcdserverpb is a generated protocol buffer package.
It is generated from these files:
etcdserver.proto raft_internal.proto rpc.proto
It has these top-level messages:
Request Metadata InternalRaftRequest ResponseHeader RangeRequest RangeResponse PutRequest PutResponse DeleteRangeRequest DeleteRangeResponse RequestUnion ResponseUnion Compare TxnRequest TxnResponse CompactionRequest CompactionResponse
Index ¶
- Variables
- func RegisterEtcdServer(s *grpc.Server, srv EtcdServer)
- type CompactionRequest
- func (m *CompactionRequest) Marshal() (data []byte, err error)
- func (m *CompactionRequest) MarshalTo(data []byte) (int, error)
- func (*CompactionRequest) ProtoMessage()
- func (m *CompactionRequest) Reset()
- func (m *CompactionRequest) Size() (n int)
- func (m *CompactionRequest) String() string
- func (m *CompactionRequest) Unmarshal(data []byte) error
- type CompactionResponse
- func (m *CompactionResponse) GetHeader() *ResponseHeader
- func (m *CompactionResponse) Marshal() (data []byte, err error)
- func (m *CompactionResponse) MarshalTo(data []byte) (int, error)
- func (*CompactionResponse) ProtoMessage()
- func (m *CompactionResponse) Reset()
- func (m *CompactionResponse) Size() (n int)
- func (m *CompactionResponse) String() string
- func (m *CompactionResponse) Unmarshal(data []byte) error
- type Compare
- func (m *Compare) GetCreateRevision() int64
- func (m *Compare) GetModRevision() int64
- func (m *Compare) GetTargetUnion() isCompare_TargetUnion
- func (m *Compare) GetValue() []byte
- func (m *Compare) GetVersion() int64
- func (m *Compare) Marshal() (data []byte, err error)
- func (m *Compare) MarshalTo(data []byte) (int, error)
- func (*Compare) ProtoMessage()
- func (m *Compare) Reset()
- func (m *Compare) Size() (n int)
- func (m *Compare) String() string
- func (m *Compare) Unmarshal(data []byte) error
- func (*Compare) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Compare_CompareResult
- type Compare_CompareTarget
- type Compare_CreateRevision
- type Compare_ModRevision
- type Compare_Value
- type Compare_Version
- type DeleteRangeRequest
- func (m *DeleteRangeRequest) Marshal() (data []byte, err error)
- func (m *DeleteRangeRequest) MarshalTo(data []byte) (int, error)
- func (*DeleteRangeRequest) ProtoMessage()
- func (m *DeleteRangeRequest) Reset()
- func (m *DeleteRangeRequest) Size() (n int)
- func (m *DeleteRangeRequest) String() string
- func (m *DeleteRangeRequest) Unmarshal(data []byte) error
- type DeleteRangeResponse
- func (m *DeleteRangeResponse) GetHeader() *ResponseHeader
- func (m *DeleteRangeResponse) Marshal() (data []byte, err error)
- func (m *DeleteRangeResponse) MarshalTo(data []byte) (int, error)
- func (*DeleteRangeResponse) ProtoMessage()
- func (m *DeleteRangeResponse) Reset()
- func (m *DeleteRangeResponse) Size() (n int)
- func (m *DeleteRangeResponse) String() string
- func (m *DeleteRangeResponse) Unmarshal(data []byte) error
- type EtcdClient
- type EtcdServer
- type InternalRaftRequest
- func (m *InternalRaftRequest) Marshal() (data []byte, err error)
- func (m *InternalRaftRequest) MarshalTo(data []byte) (int, error)
- func (*InternalRaftRequest) ProtoMessage()
- func (m *InternalRaftRequest) Reset()
- func (m *InternalRaftRequest) Size() (n int)
- func (m *InternalRaftRequest) String() string
- func (m *InternalRaftRequest) Unmarshal(data []byte) error
- type Metadata
- type PutRequest
- type PutResponse
- func (m *PutResponse) GetHeader() *ResponseHeader
- func (m *PutResponse) Marshal() (data []byte, err error)
- func (m *PutResponse) MarshalTo(data []byte) (int, error)
- func (*PutResponse) ProtoMessage()
- func (m *PutResponse) Reset()
- func (m *PutResponse) Size() (n int)
- func (m *PutResponse) String() string
- func (m *PutResponse) Unmarshal(data []byte) error
- type RangeRequest
- func (m *RangeRequest) Marshal() (data []byte, err error)
- func (m *RangeRequest) MarshalTo(data []byte) (int, error)
- func (*RangeRequest) ProtoMessage()
- func (m *RangeRequest) Reset()
- func (m *RangeRequest) Size() (n int)
- func (m *RangeRequest) String() string
- func (m *RangeRequest) Unmarshal(data []byte) error
- type RangeResponse
- func (m *RangeResponse) GetHeader() *ResponseHeader
- func (m *RangeResponse) GetKvs() []*storagepb.KeyValue
- func (m *RangeResponse) Marshal() (data []byte, err error)
- func (m *RangeResponse) MarshalTo(data []byte) (int, error)
- func (*RangeResponse) ProtoMessage()
- func (m *RangeResponse) Reset()
- func (m *RangeResponse) Size() (n int)
- func (m *RangeResponse) String() string
- func (m *RangeResponse) Unmarshal(data []byte) error
- type Request
- type RequestUnion
- func (m *RequestUnion) GetRequest() isRequestUnion_Request
- func (m *RequestUnion) GetRequestDeleteRange() *DeleteRangeRequest
- func (m *RequestUnion) GetRequestPut() *PutRequest
- func (m *RequestUnion) GetRequestRange() *RangeRequest
- func (m *RequestUnion) Marshal() (data []byte, err error)
- func (m *RequestUnion) MarshalTo(data []byte) (int, error)
- func (*RequestUnion) ProtoMessage()
- func (m *RequestUnion) Reset()
- func (m *RequestUnion) Size() (n int)
- func (m *RequestUnion) String() string
- func (m *RequestUnion) Unmarshal(data []byte) error
- func (*RequestUnion) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type RequestUnion_RequestDeleteRange
- type RequestUnion_RequestPut
- type RequestUnion_RequestRange
- type ResponseHeader
- func (m *ResponseHeader) Marshal() (data []byte, err error)
- func (m *ResponseHeader) MarshalTo(data []byte) (int, error)
- func (*ResponseHeader) ProtoMessage()
- func (m *ResponseHeader) Reset()
- func (m *ResponseHeader) Size() (n int)
- func (m *ResponseHeader) String() string
- func (m *ResponseHeader) Unmarshal(data []byte) error
- type ResponseUnion
- func (m *ResponseUnion) GetResponse() isResponseUnion_Response
- func (m *ResponseUnion) GetResponseDeleteRange() *DeleteRangeResponse
- func (m *ResponseUnion) GetResponsePut() *PutResponse
- func (m *ResponseUnion) GetResponseRange() *RangeResponse
- func (m *ResponseUnion) Marshal() (data []byte, err error)
- func (m *ResponseUnion) MarshalTo(data []byte) (int, error)
- func (*ResponseUnion) ProtoMessage()
- func (m *ResponseUnion) Reset()
- func (m *ResponseUnion) Size() (n int)
- func (m *ResponseUnion) String() string
- func (m *ResponseUnion) Unmarshal(data []byte) error
- func (*ResponseUnion) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type ResponseUnion_ResponseDeleteRange
- type ResponseUnion_ResponsePut
- type ResponseUnion_ResponseRange
- type TxnRequest
- func (m *TxnRequest) GetCompare() []*Compare
- func (m *TxnRequest) GetFailure() []*RequestUnion
- func (m *TxnRequest) GetSuccess() []*RequestUnion
- func (m *TxnRequest) Marshal() (data []byte, err error)
- func (m *TxnRequest) MarshalTo(data []byte) (int, error)
- func (*TxnRequest) ProtoMessage()
- func (m *TxnRequest) Reset()
- func (m *TxnRequest) Size() (n int)
- func (m *TxnRequest) String() string
- func (m *TxnRequest) Unmarshal(data []byte) error
- type TxnResponse
- func (m *TxnResponse) GetHeader() *ResponseHeader
- func (m *TxnResponse) GetResponses() []*ResponseUnion
- func (m *TxnResponse) Marshal() (data []byte, err error)
- func (m *TxnResponse) MarshalTo(data []byte) (int, error)
- func (*TxnResponse) ProtoMessage()
- func (m *TxnResponse) Reset()
- func (m *TxnResponse) Size() (n int)
- func (m *TxnResponse) String() string
- func (m *TxnResponse) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthEtcdserver = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEtcdserver = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthRaftInternal = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRaftInternal = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") )
var Compare_CompareResult_name = map[int32]string{
0: "EQUAL",
1: "GREATER",
2: "LESS",
}
var Compare_CompareResult_value = map[string]int32{
"EQUAL": 0,
"GREATER": 1,
"LESS": 2,
}
var Compare_CompareTarget_name = map[int32]string{
0: "VERSION",
1: "CREATE",
2: "MOD",
3: "VALUE",
}
var Compare_CompareTarget_value = map[string]int32{
"VERSION": 0,
"CREATE": 1,
"MOD": 2,
"VALUE": 3,
}
Functions ¶
func RegisterEtcdServer ¶ added in v1.0.6
func RegisterEtcdServer(s *grpc.Server, srv EtcdServer)
Types ¶
type CompactionRequest ¶ added in v1.0.6
type CompactionRequest struct {
Revision int64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
}
Compaction compacts the kv store upto the given revision (including). It removes the old versions of a key. It keeps the newest version of the key even if its latest modification revision is smaller than the given revision.
func (*CompactionRequest) Marshal ¶ added in v1.0.6
func (m *CompactionRequest) Marshal() (data []byte, err error)
func (*CompactionRequest) MarshalTo ¶ added in v1.0.6
func (m *CompactionRequest) MarshalTo(data []byte) (int, error)
func (*CompactionRequest) ProtoMessage ¶ added in v1.0.6
func (*CompactionRequest) ProtoMessage()
func (*CompactionRequest) Reset ¶ added in v1.0.6
func (m *CompactionRequest) Reset()
func (*CompactionRequest) Size ¶ added in v1.0.6
func (m *CompactionRequest) Size() (n int)
func (*CompactionRequest) String ¶ added in v1.0.6
func (m *CompactionRequest) String() string
func (*CompactionRequest) Unmarshal ¶ added in v1.0.6
func (m *CompactionRequest) Unmarshal(data []byte) error
type CompactionResponse ¶ added in v1.0.6
type CompactionResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*CompactionResponse) GetHeader ¶ added in v1.0.6
func (m *CompactionResponse) GetHeader() *ResponseHeader
func (*CompactionResponse) Marshal ¶ added in v1.0.6
func (m *CompactionResponse) Marshal() (data []byte, err error)
func (*CompactionResponse) MarshalTo ¶ added in v1.0.6
func (m *CompactionResponse) MarshalTo(data []byte) (int, error)
func (*CompactionResponse) ProtoMessage ¶ added in v1.0.6
func (*CompactionResponse) ProtoMessage()
func (*CompactionResponse) Reset ¶ added in v1.0.6
func (m *CompactionResponse) Reset()
func (*CompactionResponse) Size ¶ added in v1.0.6
func (m *CompactionResponse) Size() (n int)
func (*CompactionResponse) String ¶ added in v1.0.6
func (m *CompactionResponse) String() string
func (*CompactionResponse) Unmarshal ¶ added in v1.0.6
func (m *CompactionResponse) Unmarshal(data []byte) error
type Compare ¶ added in v1.0.6
type Compare struct { Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=etcdserverpb.Compare_CompareResult" json:"result,omitempty"` Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=etcdserverpb.Compare_CompareTarget" json:"target,omitempty"` // key path Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // Types that are valid to be assigned to TargetUnion: // *Compare_Version // *Compare_CreateRevision // *Compare_ModRevision // *Compare_Value TargetUnion isCompare_TargetUnion `protobuf_oneof:"target_union"` }
func (*Compare) GetCreateRevision ¶ added in v1.1.4
func (*Compare) GetModRevision ¶ added in v1.1.4
func (*Compare) GetTargetUnion ¶ added in v1.1.4
func (m *Compare) GetTargetUnion() isCompare_TargetUnion
func (*Compare) GetVersion ¶ added in v1.1.4
func (*Compare) ProtoMessage ¶ added in v1.0.6
func (*Compare) ProtoMessage()
type Compare_CompareResult ¶ added in v1.1.2
type Compare_CompareResult int32
const ( Compare_EQUAL Compare_CompareResult = 0 Compare_GREATER Compare_CompareResult = 1 Compare_LESS Compare_CompareResult = 2 )
func (Compare_CompareResult) String ¶ added in v1.1.2
func (x Compare_CompareResult) String() string
type Compare_CompareTarget ¶ added in v1.1.2
type Compare_CompareTarget int32
const ( Compare_VERSION Compare_CompareTarget = 0 Compare_CREATE Compare_CompareTarget = 1 Compare_MOD Compare_CompareTarget = 2 Compare_VALUE Compare_CompareTarget = 3 )
func (Compare_CompareTarget) String ¶ added in v1.1.2
func (x Compare_CompareTarget) String() string
type Compare_CreateRevision ¶ added in v1.1.4
type Compare_CreateRevision struct {
CreateRevision int64 `protobuf:"varint,5,opt,name=create_revision,proto3,oneof"`
}
func (*Compare_CreateRevision) MarshalTo ¶ added in v1.1.4
func (m *Compare_CreateRevision) MarshalTo(data []byte) (int, error)
func (*Compare_CreateRevision) Size ¶ added in v1.1.4
func (m *Compare_CreateRevision) Size() (n int)
type Compare_ModRevision ¶ added in v1.1.4
type Compare_ModRevision struct {
ModRevision int64 `protobuf:"varint,6,opt,name=mod_revision,proto3,oneof"`
}
func (*Compare_ModRevision) MarshalTo ¶ added in v1.1.4
func (m *Compare_ModRevision) MarshalTo(data []byte) (int, error)
func (*Compare_ModRevision) Size ¶ added in v1.1.4
func (m *Compare_ModRevision) Size() (n int)
type Compare_Value ¶ added in v1.1.4
type Compare_Value struct {
Value []byte `protobuf:"bytes,7,opt,name=value,proto3,oneof"`
}
func (*Compare_Value) MarshalTo ¶ added in v1.1.4
func (m *Compare_Value) MarshalTo(data []byte) (int, error)
func (*Compare_Value) Size ¶ added in v1.1.4
func (m *Compare_Value) Size() (n int)
type Compare_Version ¶ added in v1.1.4
type Compare_Version struct {
Version int64 `protobuf:"varint,4,opt,name=version,proto3,oneof"`
}
func (*Compare_Version) MarshalTo ¶ added in v1.1.4
func (m *Compare_Version) MarshalTo(data []byte) (int, error)
func (*Compare_Version) Size ¶ added in v1.1.4
func (m *Compare_Version) Size() (n int)
type DeleteRangeRequest ¶ added in v1.0.6
type DeleteRangeRequest struct { // if the range_end is not given, the request deletes the key. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // if the range_end is given, it deletes the keys in range [key, range_end). RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,proto3" json:"range_end,omitempty"` }
func (*DeleteRangeRequest) Marshal ¶ added in v1.0.6
func (m *DeleteRangeRequest) Marshal() (data []byte, err error)
func (*DeleteRangeRequest) MarshalTo ¶ added in v1.0.6
func (m *DeleteRangeRequest) MarshalTo(data []byte) (int, error)
func (*DeleteRangeRequest) ProtoMessage ¶ added in v1.0.6
func (*DeleteRangeRequest) ProtoMessage()
func (*DeleteRangeRequest) Reset ¶ added in v1.0.6
func (m *DeleteRangeRequest) Reset()
func (*DeleteRangeRequest) Size ¶ added in v1.0.6
func (m *DeleteRangeRequest) Size() (n int)
func (*DeleteRangeRequest) String ¶ added in v1.0.6
func (m *DeleteRangeRequest) String() string
func (*DeleteRangeRequest) Unmarshal ¶ added in v1.0.6
func (m *DeleteRangeRequest) Unmarshal(data []byte) error
type DeleteRangeResponse ¶ added in v1.0.6
type DeleteRangeResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*DeleteRangeResponse) GetHeader ¶ added in v1.0.6
func (m *DeleteRangeResponse) GetHeader() *ResponseHeader
func (*DeleteRangeResponse) Marshal ¶ added in v1.0.6
func (m *DeleteRangeResponse) Marshal() (data []byte, err error)
func (*DeleteRangeResponse) MarshalTo ¶ added in v1.0.6
func (m *DeleteRangeResponse) MarshalTo(data []byte) (int, error)
func (*DeleteRangeResponse) ProtoMessage ¶ added in v1.0.6
func (*DeleteRangeResponse) ProtoMessage()
func (*DeleteRangeResponse) Reset ¶ added in v1.0.6
func (m *DeleteRangeResponse) Reset()
func (*DeleteRangeResponse) Size ¶ added in v1.0.6
func (m *DeleteRangeResponse) Size() (n int)
func (*DeleteRangeResponse) String ¶ added in v1.0.6
func (m *DeleteRangeResponse) String() string
func (*DeleteRangeResponse) Unmarshal ¶ added in v1.0.6
func (m *DeleteRangeResponse) Unmarshal(data []byte) error
type EtcdClient ¶ added in v1.0.6
type EtcdClient interface { // Range gets the keys in the range from the store. Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) // Put puts the given key into the store. // A put request increases the revision of the store, // and generates one event in the event history. Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) // Delete deletes the given range from the store. // A delete request increase the revision of the store, // and generates one event in the event history. DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error) // Txn processes all the requests in one transaction. // A txn request increases the revision of the store, // and generates events with the same revision in the event history. Txn(ctx context.Context, in *TxnRequest, opts ...grpc.CallOption) (*TxnResponse, error) // Compact compacts the event history in etcd. User should compact the // event history periodically, or it will grow infinitely. Compact(ctx context.Context, in *CompactionRequest, opts ...grpc.CallOption) (*CompactionResponse, error) }
func NewEtcdClient ¶ added in v1.0.6
func NewEtcdClient(cc *grpc.ClientConn) EtcdClient
type EtcdServer ¶ added in v1.0.6
type EtcdServer interface { // Range gets the keys in the range from the store. Range(context.Context, *RangeRequest) (*RangeResponse, error) // Put puts the given key into the store. // A put request increases the revision of the store, // and generates one event in the event history. Put(context.Context, *PutRequest) (*PutResponse, error) // Delete deletes the given range from the store. // A delete request increase the revision of the store, // and generates one event in the event history. DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error) // Txn processes all the requests in one transaction. // A txn request increases the revision of the store, // and generates events with the same revision in the event history. Txn(context.Context, *TxnRequest) (*TxnResponse, error) // Compact compacts the event history in etcd. User should compact the // event history periodically, or it will grow infinitely. Compact(context.Context, *CompactionRequest) (*CompactionResponse, error) }
type InternalRaftRequest ¶ added in v1.1.2
type InternalRaftRequest struct { V2 *Request `protobuf:"bytes,1,opt,name=v2" json:"v2,omitempty"` Range *RangeRequest `protobuf:"bytes,2,opt,name=range" json:"range,omitempty"` Put *PutRequest `protobuf:"bytes,3,opt,name=put" json:"put,omitempty"` DeleteRange *DeleteRangeRequest `protobuf:"bytes,4,opt,name=delete_range" json:"delete_range,omitempty"` Txn *TxnRequest `protobuf:"bytes,5,opt,name=txn" json:"txn,omitempty"` }
An InternalRaftRequest is the union of all requests which can be sent via raft.
func (*InternalRaftRequest) Marshal ¶ added in v1.1.2
func (m *InternalRaftRequest) Marshal() (data []byte, err error)
func (*InternalRaftRequest) MarshalTo ¶ added in v1.1.2
func (m *InternalRaftRequest) MarshalTo(data []byte) (int, error)
func (*InternalRaftRequest) ProtoMessage ¶ added in v1.1.2
func (*InternalRaftRequest) ProtoMessage()
func (*InternalRaftRequest) Reset ¶ added in v1.1.2
func (m *InternalRaftRequest) Reset()
func (*InternalRaftRequest) Size ¶ added in v1.1.2
func (m *InternalRaftRequest) Size() (n int)
func (*InternalRaftRequest) String ¶ added in v1.1.2
func (m *InternalRaftRequest) String() string
func (*InternalRaftRequest) Unmarshal ¶ added in v1.1.2
func (m *InternalRaftRequest) Unmarshal(data []byte) error
type Metadata ¶
type Metadata struct { NodeID uint64 `protobuf:"varint,1,opt,name=NodeID" json:"NodeID"` ClusterID uint64 `protobuf:"varint,2,opt,name=ClusterID" json:"ClusterID"` XXX_unrecognized []byte `json:"-"` }
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
type PutRequest ¶ added in v1.0.6
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"` }
func (*PutRequest) Marshal ¶ added in v1.0.6
func (m *PutRequest) Marshal() (data []byte, err error)
func (*PutRequest) MarshalTo ¶ added in v1.0.6
func (m *PutRequest) MarshalTo(data []byte) (int, error)
func (*PutRequest) ProtoMessage ¶ added in v1.0.6
func (*PutRequest) ProtoMessage()
func (*PutRequest) Reset ¶ added in v1.0.6
func (m *PutRequest) Reset()
func (*PutRequest) Size ¶ added in v1.0.6
func (m *PutRequest) Size() (n int)
func (*PutRequest) String ¶ added in v1.0.6
func (m *PutRequest) String() string
func (*PutRequest) Unmarshal ¶ added in v1.0.6
func (m *PutRequest) Unmarshal(data []byte) error
type PutResponse ¶ added in v1.0.6
type PutResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (*PutResponse) GetHeader ¶ added in v1.0.6
func (m *PutResponse) GetHeader() *ResponseHeader
func (*PutResponse) Marshal ¶ added in v1.0.6
func (m *PutResponse) Marshal() (data []byte, err error)
func (*PutResponse) MarshalTo ¶ added in v1.0.6
func (m *PutResponse) MarshalTo(data []byte) (int, error)
func (*PutResponse) ProtoMessage ¶ added in v1.0.6
func (*PutResponse) ProtoMessage()
func (*PutResponse) Reset ¶ added in v1.0.6
func (m *PutResponse) Reset()
func (*PutResponse) Size ¶ added in v1.0.6
func (m *PutResponse) Size() (n int)
func (*PutResponse) String ¶ added in v1.0.6
func (m *PutResponse) String() string
func (*PutResponse) Unmarshal ¶ added in v1.0.6
func (m *PutResponse) Unmarshal(data []byte) error
type RangeRequest ¶ added in v1.0.6
type RangeRequest struct { // if the range_end is not given, the request returns the key. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // if the range_end is given, it gets the keys in range [key, range_end). RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,proto3" json:"range_end,omitempty"` // limit the number of keys returned. Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` // range over the store at the given revision. // if revision is less or equal to zero, range over the newest store. // if the revision has been compacted, ErrCompaction will be returned in // response. Revision int64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"` }
func (*RangeRequest) Marshal ¶ added in v1.0.6
func (m *RangeRequest) Marshal() (data []byte, err error)
func (*RangeRequest) MarshalTo ¶ added in v1.0.6
func (m *RangeRequest) MarshalTo(data []byte) (int, error)
func (*RangeRequest) ProtoMessage ¶ added in v1.0.6
func (*RangeRequest) ProtoMessage()
func (*RangeRequest) Reset ¶ added in v1.0.6
func (m *RangeRequest) Reset()
func (*RangeRequest) Size ¶ added in v1.0.6
func (m *RangeRequest) Size() (n int)
func (*RangeRequest) String ¶ added in v1.0.6
func (m *RangeRequest) String() string
func (*RangeRequest) Unmarshal ¶ added in v1.0.6
func (m *RangeRequest) Unmarshal(data []byte) error
type RangeResponse ¶ added in v1.0.6
type RangeResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Kvs []*storagepb.KeyValue `protobuf:"bytes,2,rep,name=kvs" json:"kvs,omitempty"` // more indicates if there are more keys to return in the requested range. More bool `protobuf:"varint,3,opt,name=more,proto3" json:"more,omitempty"` }
func (*RangeResponse) GetHeader ¶ added in v1.0.6
func (m *RangeResponse) GetHeader() *ResponseHeader
func (*RangeResponse) GetKvs ¶ added in v1.0.6
func (m *RangeResponse) GetKvs() []*storagepb.KeyValue
func (*RangeResponse) Marshal ¶ added in v1.0.6
func (m *RangeResponse) Marshal() (data []byte, err error)
func (*RangeResponse) MarshalTo ¶ added in v1.0.6
func (m *RangeResponse) MarshalTo(data []byte) (int, error)
func (*RangeResponse) ProtoMessage ¶ added in v1.0.6
func (*RangeResponse) ProtoMessage()
func (*RangeResponse) Reset ¶ added in v1.0.6
func (m *RangeResponse) Reset()
func (*RangeResponse) Size ¶ added in v1.0.6
func (m *RangeResponse) Size() (n int)
func (*RangeResponse) String ¶ added in v1.0.6
func (m *RangeResponse) String() string
func (*RangeResponse) Unmarshal ¶ added in v1.0.6
func (m *RangeResponse) Unmarshal(data []byte) error
type Request ¶
type Request struct { ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"` Method string `protobuf:"bytes,2,opt,name=Method" json:"Method"` Path string `protobuf:"bytes,3,opt,name=Path" json:"Path"` Val string `protobuf:"bytes,4,opt,name=Val" json:"Val"` Dir bool `protobuf:"varint,5,opt,name=Dir" json:"Dir"` PrevValue string `protobuf:"bytes,6,opt,name=PrevValue" json:"PrevValue"` PrevIndex uint64 `protobuf:"varint,7,opt,name=PrevIndex" json:"PrevIndex"` PrevExist *bool `protobuf:"varint,8,opt,name=PrevExist" json:"PrevExist,omitempty"` Expiration int64 `protobuf:"varint,9,opt,name=Expiration" json:"Expiration"` Wait bool `protobuf:"varint,10,opt,name=Wait" json:"Wait"` Since uint64 `protobuf:"varint,11,opt,name=Since" json:"Since"` Recursive bool `protobuf:"varint,12,opt,name=Recursive" json:"Recursive"` Sorted bool `protobuf:"varint,13,opt,name=Sorted" json:"Sorted"` Quorum bool `protobuf:"varint,14,opt,name=Quorum" json:"Quorum"` Time int64 `protobuf:"varint,15,opt,name=Time" json:"Time"` Stream bool `protobuf:"varint,16,opt,name=Stream" json:"Stream"` XXX_unrecognized []byte `json:"-"` }
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type RequestUnion ¶ added in v1.0.6
type RequestUnion struct { // Types that are valid to be assigned to Request: // *RequestUnion_RequestRange // *RequestUnion_RequestPut // *RequestUnion_RequestDeleteRange Request isRequestUnion_Request `protobuf_oneof:"request"` }
func (*RequestUnion) GetRequest ¶ added in v1.1.4
func (m *RequestUnion) GetRequest() isRequestUnion_Request
func (*RequestUnion) GetRequestDeleteRange ¶ added in v1.0.6
func (m *RequestUnion) GetRequestDeleteRange() *DeleteRangeRequest
func (*RequestUnion) GetRequestPut ¶ added in v1.0.6
func (m *RequestUnion) GetRequestPut() *PutRequest
func (*RequestUnion) GetRequestRange ¶ added in v1.0.6
func (m *RequestUnion) GetRequestRange() *RangeRequest
func (*RequestUnion) Marshal ¶ added in v1.0.6
func (m *RequestUnion) Marshal() (data []byte, err error)
func (*RequestUnion) MarshalTo ¶ added in v1.0.6
func (m *RequestUnion) MarshalTo(data []byte) (int, error)
func (*RequestUnion) ProtoMessage ¶ added in v1.0.6
func (*RequestUnion) ProtoMessage()
func (*RequestUnion) Reset ¶ added in v1.0.6
func (m *RequestUnion) Reset()
func (*RequestUnion) Size ¶ added in v1.0.6
func (m *RequestUnion) Size() (n int)
func (*RequestUnion) String ¶ added in v1.0.6
func (m *RequestUnion) String() string
func (*RequestUnion) Unmarshal ¶ added in v1.0.6
func (m *RequestUnion) Unmarshal(data []byte) error
type RequestUnion_RequestDeleteRange ¶ added in v1.1.4
type RequestUnion_RequestDeleteRange struct {
RequestDeleteRange *DeleteRangeRequest `protobuf:"bytes,3,opt,name=request_delete_range,oneof"`
}
func (*RequestUnion_RequestDeleteRange) MarshalTo ¶ added in v1.1.4
func (m *RequestUnion_RequestDeleteRange) MarshalTo(data []byte) (int, error)
func (*RequestUnion_RequestDeleteRange) Size ¶ added in v1.1.4
func (m *RequestUnion_RequestDeleteRange) Size() (n int)
type RequestUnion_RequestPut ¶ added in v1.1.4
type RequestUnion_RequestPut struct {
RequestPut *PutRequest `protobuf:"bytes,2,opt,name=request_put,oneof"`
}
func (*RequestUnion_RequestPut) MarshalTo ¶ added in v1.1.4
func (m *RequestUnion_RequestPut) MarshalTo(data []byte) (int, error)
func (*RequestUnion_RequestPut) Size ¶ added in v1.1.4
func (m *RequestUnion_RequestPut) Size() (n int)
type RequestUnion_RequestRange ¶ added in v1.1.4
type RequestUnion_RequestRange struct {
RequestRange *RangeRequest `protobuf:"bytes,1,opt,name=request_range,oneof"`
}
func (*RequestUnion_RequestRange) MarshalTo ¶ added in v1.1.4
func (m *RequestUnion_RequestRange) MarshalTo(data []byte) (int, error)
func (*RequestUnion_RequestRange) Size ¶ added in v1.1.4
func (m *RequestUnion_RequestRange) Size() (n int)
type ResponseHeader ¶ added in v1.0.6
type ResponseHeader struct { // an error type message? Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` ClusterId uint64 `protobuf:"varint,2,opt,name=cluster_id,proto3" json:"cluster_id,omitempty"` MemberId uint64 `protobuf:"varint,3,opt,name=member_id,proto3" json:"member_id,omitempty"` // revision of the store when the request was applied. Revision int64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"` // term of raft when the request was applied. RaftTerm uint64 `protobuf:"varint,5,opt,name=raft_term,proto3" json:"raft_term,omitempty"` }
func (*ResponseHeader) Marshal ¶ added in v1.0.6
func (m *ResponseHeader) Marshal() (data []byte, err error)
func (*ResponseHeader) MarshalTo ¶ added in v1.0.6
func (m *ResponseHeader) MarshalTo(data []byte) (int, error)
func (*ResponseHeader) ProtoMessage ¶ added in v1.0.6
func (*ResponseHeader) ProtoMessage()
func (*ResponseHeader) Reset ¶ added in v1.0.6
func (m *ResponseHeader) Reset()
func (*ResponseHeader) Size ¶ added in v1.0.6
func (m *ResponseHeader) Size() (n int)
func (*ResponseHeader) String ¶ added in v1.0.6
func (m *ResponseHeader) String() string
func (*ResponseHeader) Unmarshal ¶ added in v1.0.6
func (m *ResponseHeader) Unmarshal(data []byte) error
type ResponseUnion ¶ added in v1.0.6
type ResponseUnion struct { // Types that are valid to be assigned to Response: // *ResponseUnion_ResponseRange // *ResponseUnion_ResponsePut // *ResponseUnion_ResponseDeleteRange Response isResponseUnion_Response `protobuf_oneof:"response"` }
func (*ResponseUnion) GetResponse ¶ added in v1.1.4
func (m *ResponseUnion) GetResponse() isResponseUnion_Response
func (*ResponseUnion) GetResponseDeleteRange ¶ added in v1.0.6
func (m *ResponseUnion) GetResponseDeleteRange() *DeleteRangeResponse
func (*ResponseUnion) GetResponsePut ¶ added in v1.0.6
func (m *ResponseUnion) GetResponsePut() *PutResponse
func (*ResponseUnion) GetResponseRange ¶ added in v1.1.2
func (m *ResponseUnion) GetResponseRange() *RangeResponse
func (*ResponseUnion) Marshal ¶ added in v1.0.6
func (m *ResponseUnion) Marshal() (data []byte, err error)
func (*ResponseUnion) MarshalTo ¶ added in v1.0.6
func (m *ResponseUnion) MarshalTo(data []byte) (int, error)
func (*ResponseUnion) ProtoMessage ¶ added in v1.0.6
func (*ResponseUnion) ProtoMessage()
func (*ResponseUnion) Reset ¶ added in v1.0.6
func (m *ResponseUnion) Reset()
func (*ResponseUnion) Size ¶ added in v1.0.6
func (m *ResponseUnion) Size() (n int)
func (*ResponseUnion) String ¶ added in v1.0.6
func (m *ResponseUnion) String() string
func (*ResponseUnion) Unmarshal ¶ added in v1.0.6
func (m *ResponseUnion) Unmarshal(data []byte) error
type ResponseUnion_ResponseDeleteRange ¶ added in v1.1.4
type ResponseUnion_ResponseDeleteRange struct {
ResponseDeleteRange *DeleteRangeResponse `protobuf:"bytes,3,opt,name=response_delete_range,oneof"`
}
func (*ResponseUnion_ResponseDeleteRange) MarshalTo ¶ added in v1.1.4
func (m *ResponseUnion_ResponseDeleteRange) MarshalTo(data []byte) (int, error)
func (*ResponseUnion_ResponseDeleteRange) Size ¶ added in v1.1.4
func (m *ResponseUnion_ResponseDeleteRange) Size() (n int)
type ResponseUnion_ResponsePut ¶ added in v1.1.4
type ResponseUnion_ResponsePut struct {
ResponsePut *PutResponse `protobuf:"bytes,2,opt,name=response_put,oneof"`
}
func (*ResponseUnion_ResponsePut) MarshalTo ¶ added in v1.1.4
func (m *ResponseUnion_ResponsePut) MarshalTo(data []byte) (int, error)
func (*ResponseUnion_ResponsePut) Size ¶ added in v1.1.4
func (m *ResponseUnion_ResponsePut) Size() (n int)
type ResponseUnion_ResponseRange ¶ added in v1.1.4
type ResponseUnion_ResponseRange struct {
ResponseRange *RangeResponse `protobuf:"bytes,1,opt,name=response_range,oneof"`
}
func (*ResponseUnion_ResponseRange) MarshalTo ¶ added in v1.1.4
func (m *ResponseUnion_ResponseRange) MarshalTo(data []byte) (int, error)
func (*ResponseUnion_ResponseRange) Size ¶ added in v1.1.4
func (m *ResponseUnion_ResponseRange) Size() (n int)
type TxnRequest ¶ added in v1.1.2
type TxnRequest struct { Compare []*Compare `protobuf:"bytes,1,rep,name=compare" json:"compare,omitempty"` Success []*RequestUnion `protobuf:"bytes,2,rep,name=success" json:"success,omitempty"` Failure []*RequestUnion `protobuf:"bytes,3,rep,name=failure" json:"failure,omitempty"` }
From google paxosdb paper: Our implementation hinges around a powerful primitive which we call MultiOp. All other database operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically and consists of three components: 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check for the absence or presence of a value, or compare with a given value. Two different tests in the guard may apply to the same or different entries in the database. All tests in the guard are applied and MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise it executes f op (see item 3 below). 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or lookup operation, and applies to a single database entry. Two different operations in the list may apply to the same or different entries in the database. These operations are executed if guard evaluates to true. 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.
func (*TxnRequest) GetCompare ¶ added in v1.1.2
func (m *TxnRequest) GetCompare() []*Compare
func (*TxnRequest) GetFailure ¶ added in v1.1.2
func (m *TxnRequest) GetFailure() []*RequestUnion
func (*TxnRequest) GetSuccess ¶ added in v1.1.2
func (m *TxnRequest) GetSuccess() []*RequestUnion
func (*TxnRequest) Marshal ¶ added in v1.1.2
func (m *TxnRequest) Marshal() (data []byte, err error)
func (*TxnRequest) MarshalTo ¶ added in v1.1.2
func (m *TxnRequest) MarshalTo(data []byte) (int, error)
func (*TxnRequest) ProtoMessage ¶ added in v1.1.2
func (*TxnRequest) ProtoMessage()
func (*TxnRequest) Reset ¶ added in v1.1.2
func (m *TxnRequest) Reset()
func (*TxnRequest) Size ¶ added in v1.1.2
func (m *TxnRequest) Size() (n int)
func (*TxnRequest) String ¶ added in v1.1.2
func (m *TxnRequest) String() string
func (*TxnRequest) Unmarshal ¶ added in v1.1.2
func (m *TxnRequest) Unmarshal(data []byte) error
type TxnResponse ¶ added in v1.1.2
type TxnResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` Succeeded bool `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"` Responses []*ResponseUnion `protobuf:"bytes,3,rep,name=responses" json:"responses,omitempty"` }
func (*TxnResponse) GetHeader ¶ added in v1.1.2
func (m *TxnResponse) GetHeader() *ResponseHeader
func (*TxnResponse) GetResponses ¶ added in v1.1.2
func (m *TxnResponse) GetResponses() []*ResponseUnion
func (*TxnResponse) Marshal ¶ added in v1.1.2
func (m *TxnResponse) Marshal() (data []byte, err error)
func (*TxnResponse) MarshalTo ¶ added in v1.1.2
func (m *TxnResponse) MarshalTo(data []byte) (int, error)
func (*TxnResponse) ProtoMessage ¶ added in v1.1.2
func (*TxnResponse) ProtoMessage()
func (*TxnResponse) Reset ¶ added in v1.1.2
func (m *TxnResponse) Reset()
func (*TxnResponse) Size ¶ added in v1.1.2
func (m *TxnResponse) Size() (n int)
func (*TxnResponse) String ¶ added in v1.1.2
func (m *TxnResponse) String() string
func (*TxnResponse) Unmarshal ¶ added in v1.1.2
func (m *TxnResponse) Unmarshal(data []byte) error