blob: 199ee6244d5ef0ed19659bd5a1bbc02974ce9da8 [file] [log] [blame]
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: rpc.proto
package etcdserverpb
import (
"fmt"
proto "github.com/golang/protobuf/proto"
math "math"
_ "github.com/gogo/protobuf/gogoproto"
mvccpb "go.etcd.io/etcd/mvcc/mvccpb"
authpb "go.etcd.io/etcd/auth/authpb"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
io "io"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type AlarmType int32
const (
AlarmType_NONE AlarmType = 0
AlarmType_NOSPACE AlarmType = 1
AlarmType_CORRUPT AlarmType = 2
)
var AlarmType_name = map[int32]string{
0: "NONE",
1: "NOSPACE",
2: "CORRUPT",
}
var AlarmType_value = map[string]int32{
"NONE": 0,
"NOSPACE": 1,
"CORRUPT": 2,
}
func (x AlarmType) String() string {
return proto.EnumName(AlarmType_name, int32(x))
}
func (AlarmType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRpc, []int{0} }
type RangeRequest_SortOrder int32
const (
RangeRequest_NONE RangeRequest_SortOrder = 0
RangeRequest_ASCEND RangeRequest_SortOrder = 1
RangeRequest_DESCEND RangeRequest_SortOrder = 2
)
var RangeRequest_SortOrder_name = map[int32]string{
0: "NONE",
1: "ASCEND",
2: "DESCEND",
}
var RangeRequest_SortOrder_value = map[string]int32{
"NONE": 0,
"ASCEND": 1,
"DESCEND": 2,
}
func (x RangeRequest_SortOrder) String() string {
return proto.EnumName(RangeRequest_SortOrder_name, int32(x))
}
func (RangeRequest_SortOrder) EnumDescriptor() ([]byte, []int) { return fileDescriptorRpc, []int{1, 0} }
type RangeRequest_SortTarget int32
const (
RangeRequest_KEY RangeRequest_SortTarget = 0
RangeRequest_VERSION RangeRequest_SortTarget = 1
RangeRequest_CREATE RangeRequest_SortTarget = 2
RangeRequest_MOD RangeRequest_SortTarget = 3
RangeRequest_VALUE RangeRequest_SortTarget = 4
)
var RangeRequest_SortTarget_name = map[int32]string{
0: "KEY",
1: "VERSION",
2: "CREATE",
3: "MOD",
4: "VALUE",
}
var RangeRequest_SortTarget_value = map[string]int32{
"KEY": 0,
"VERSION": 1,
"CREATE": 2,
"MOD": 3,
"VALUE": 4,
}
func (x RangeRequest_SortTarget) String() string {
return proto.EnumName(RangeRequest_SortTarget_name, int32(x))
}
func (RangeRequest_SortTarget) EnumDescriptor() ([]byte, []int) { return fileDescriptorRpc, []int{1, 1} }
type Compare_CompareResult int32
const (
Compare_EQUAL Compare_CompareResult = 0
Compare_GREATER Compare_CompareResult = 1
Compare_LESS Compare_CompareResult = 2
Compare_NOT_EQUAL Compare_CompareResult = 3
)
var Compare_CompareResult_name = map[int32]string{
0: "EQUAL",
1: "GREATER",
2: "LESS",
3: "NOT_EQUAL",
}
var Compare_CompareResult_value = map[string]int32{
"EQUAL": 0,
"GREATER": 1,
"LESS": 2,
"NOT_EQUAL": 3,
}
func (x Compare_CompareResult) String() string {
return proto.EnumName(Compare_CompareResult_name, int32(x))
}
func (Compare_CompareResult) EnumDescriptor() ([]byte, []int) { return fileDescriptorRpc, []int{9, 0} }
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
Compare_LEASE Compare_CompareTarget = 4
)
var Compare_CompareTarget_name = map[int32]string{
0: "VERSION",
1: "CREATE",
2: "MOD",
3: "VALUE",
4: "LEASE",
}
var Compare_CompareTarget_value = map[string]int32{
"VERSION": 0,
"CREATE": 1,
"MOD": 2,
"VALUE": 3,
"LEASE": 4,
}
func (x Compare_CompareTarget) String() string {
return proto.EnumName(Compare_CompareTarget_name, int32(x))
}
func (Compare_CompareTarget) EnumDescriptor() ([]byte, []int) { return fileDescriptorRpc, []int{9, 1} }
type WatchCreateRequest_FilterType int32
const (
// filter out put event.
WatchCreateRequest_NOPUT WatchCreateRequest_FilterType = 0
// filter out delete event.
WatchCreateRequest_NODELETE WatchCreateRequest_FilterType = 1
)
var WatchCreateRequest_FilterType_name = map[int32]string{
0: "NOPUT",
1: "NODELETE",
}
var WatchCreateRequest_FilterType_value = map[string]int32{
"NOPUT": 0,
"NODELETE": 1,
}
func (x WatchCreateRequest_FilterType) String() string {
return proto.EnumName(WatchCreateRequest_FilterType_name, int32(x))
}
func (WatchCreateRequest_FilterType) EnumDescriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{21, 0}
}
type AlarmRequest_AlarmAction int32
const (
AlarmRequest_GET AlarmRequest_AlarmAction = 0
AlarmRequest_ACTIVATE AlarmRequest_AlarmAction = 1
AlarmRequest_DEACTIVATE AlarmRequest_AlarmAction = 2
)
var AlarmRequest_AlarmAction_name = map[int32]string{
0: "GET",
1: "ACTIVATE",
2: "DEACTIVATE",
}
var AlarmRequest_AlarmAction_value = map[string]int32{
"GET": 0,
"ACTIVATE": 1,
"DEACTIVATE": 2,
}
func (x AlarmRequest_AlarmAction) String() string {
return proto.EnumName(AlarmRequest_AlarmAction_name, int32(x))
}
func (AlarmRequest_AlarmAction) EnumDescriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{54, 0}
}
type ResponseHeader struct {
// cluster_id is the ID of the cluster which sent the response.
ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
// member_id is the ID of the member which sent the response.
MemberId uint64 `protobuf:"varint,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
// revision is the key-value store revision when the request was applied.
// For watch progress responses, the header.revision indicates progress. All future events
// recieved in this stream are guaranteed to have a higher revision number than the
// header.revision number.
Revision int64 `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"`
// raft_term is the raft term when the request was applied.
RaftTerm uint64 `protobuf:"varint,4,opt,name=raft_term,json=raftTerm,proto3" json:"raft_term,omitempty"`
}
func (m *ResponseHeader) Reset() { *m = ResponseHeader{} }
func (m *ResponseHeader) String() string { return proto.CompactTextString(m) }
func (*ResponseHeader) ProtoMessage() {}
func (*ResponseHeader) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{0} }
func (m *ResponseHeader) GetClusterId() uint64 {
if m != nil {
return m.ClusterId
}
return 0
}
func (m *ResponseHeader) GetMemberId() uint64 {
if m != nil {
return m.MemberId
}
return 0
}
func (m *ResponseHeader) GetRevision() int64 {
if m != nil {
return m.Revision
}
return 0
}
func (m *ResponseHeader) GetRaftTerm() uint64 {
if m != nil {
return m.RaftTerm
}
return 0
}
type RangeRequest struct {
// key is the first key for the range. If range_end is not given, the request only looks up key.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// range_end is the upper bound on the requested range [key, range_end).
// If range_end is '\0', the range is all keys >= key.
// If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"),
// then the range request gets all keys prefixed with key.
// If both key and range_end are '\0', then the range request returns all keys.
RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
// limit is a limit on the number of keys returned for the request. When limit is set to 0,
// it is treated as no limit.
Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
// revision is the point-in-time of the key-value store to use for the range.
// If revision is less or equal to zero, the range is over the newest key-value store.
// If the revision has been compacted, ErrCompacted is returned as a response.
Revision int64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
// sort_order is the order for returned sorted results.
SortOrder RangeRequest_SortOrder `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,proto3,enum=etcdserverpb.RangeRequest_SortOrder" json:"sort_order,omitempty"`
// sort_target is the key-value field to use for sorting.
SortTarget RangeRequest_SortTarget `protobuf:"varint,6,opt,name=sort_target,json=sortTarget,proto3,enum=etcdserverpb.RangeRequest_SortTarget" json:"sort_target,omitempty"`
// serializable sets the range request to use serializable member-local reads.
// Range requests are linearizable by default; linearizable requests have higher
// latency and lower throughput than serializable requests but reflect the current
// consensus of the cluster. For better performance, in exchange for possible stale reads,
// a serializable range request is served locally without needing to reach consensus
// with other nodes in the cluster.
Serializable bool `protobuf:"varint,7,opt,name=serializable,proto3" json:"serializable,omitempty"`
// keys_only when set returns only the keys and not the values.
KeysOnly bool `protobuf:"varint,8,opt,name=keys_only,json=keysOnly,proto3" json:"keys_only,omitempty"`
// count_only when set returns only the count of the keys in the range.
CountOnly bool `protobuf:"varint,9,opt,name=count_only,json=countOnly,proto3" json:"count_only,omitempty"`
// min_mod_revision is the lower bound for returned key mod revisions; all keys with
// lesser mod revisions will be filtered away.
MinModRevision int64 `protobuf:"varint,10,opt,name=min_mod_revision,json=minModRevision,proto3" json:"min_mod_revision,omitempty"`
// max_mod_revision is the upper bound for returned key mod revisions; all keys with
// greater mod revisions will be filtered away.
MaxModRevision int64 `protobuf:"varint,11,opt,name=max_mod_revision,json=maxModRevision,proto3" json:"max_mod_revision,omitempty"`
// min_create_revision is the lower bound for returned key create revisions; all keys with
// lesser create revisions will be filtered away.
MinCreateRevision int64 `protobuf:"varint,12,opt,name=min_create_revision,json=minCreateRevision,proto3" json:"min_create_revision,omitempty"`
// max_create_revision is the upper bound for returned key create revisions; all keys with
// greater create revisions will be filtered away.
MaxCreateRevision int64 `protobuf:"varint,13,opt,name=max_create_revision,json=maxCreateRevision,proto3" json:"max_create_revision,omitempty"`
}
func (m *RangeRequest) Reset() { *m = RangeRequest{} }
func (m *RangeRequest) String() string { return proto.CompactTextString(m) }
func (*RangeRequest) ProtoMessage() {}
func (*RangeRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{1} }
func (m *RangeRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *RangeRequest) GetRangeEnd() []byte {
if m != nil {
return m.RangeEnd
}
return nil
}
func (m *RangeRequest) GetLimit() int64 {
if m != nil {
return m.Limit
}
return 0
}
func (m *RangeRequest) GetRevision() int64 {
if m != nil {
return m.Revision
}
return 0
}
func (m *RangeRequest) GetSortOrder() RangeRequest_SortOrder {
if m != nil {
return m.SortOrder
}
return RangeRequest_NONE
}
func (m *RangeRequest) GetSortTarget() RangeRequest_SortTarget {
if m != nil {
return m.SortTarget
}
return RangeRequest_KEY
}
func (m *RangeRequest) GetSerializable() bool {
if m != nil {
return m.Serializable
}
return false
}
func (m *RangeRequest) GetKeysOnly() bool {
if m != nil {
return m.KeysOnly
}
return false
}
func (m *RangeRequest) GetCountOnly() bool {
if m != nil {
return m.CountOnly
}
return false
}
func (m *RangeRequest) GetMinModRevision() int64 {
if m != nil {
return m.MinModRevision
}
return 0
}
func (m *RangeRequest) GetMaxModRevision() int64 {
if m != nil {
return m.MaxModRevision
}
return 0
}
func (m *RangeRequest) GetMinCreateRevision() int64 {
if m != nil {
return m.MinCreateRevision
}
return 0
}
func (m *RangeRequest) GetMaxCreateRevision() int64 {
if m != nil {
return m.MaxCreateRevision
}
return 0
}
type RangeResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// kvs is the list of key-value pairs matched by the range request.
// kvs is empty when count is requested.
Kvs []*mvccpb.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"`
// count is set to the number of keys within the range when requested.
Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (m *RangeResponse) Reset() { *m = RangeResponse{} }
func (m *RangeResponse) String() string { return proto.CompactTextString(m) }
func (*RangeResponse) ProtoMessage() {}
func (*RangeResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{2} }
func (m *RangeResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *RangeResponse) GetKvs() []*mvccpb.KeyValue {
if m != nil {
return m.Kvs
}
return nil
}
func (m *RangeResponse) GetMore() bool {
if m != nil {
return m.More
}
return false
}
func (m *RangeResponse) GetCount() int64 {
if m != nil {
return m.Count
}
return 0
}
type PutRequest struct {
// key is the key, in bytes, to put into the key-value store.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value is the value, in bytes, to associate with the key in the key-value store.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// lease is the lease ID to associate with the key in the key-value store. A lease
// value of 0 indicates no lease.
Lease int64 `protobuf:"varint,3,opt,name=lease,proto3" json:"lease,omitempty"`
// If prev_kv is set, etcd gets the previous key-value pair before changing it.
// The previous key-value pair will be returned in the put response.
PrevKv bool `protobuf:"varint,4,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"`
// If ignore_value is set, etcd updates the key using its current value.
// Returns an error if the key does not exist.
IgnoreValue bool `protobuf:"varint,5,opt,name=ignore_value,json=ignoreValue,proto3" json:"ignore_value,omitempty"`
// If ignore_lease is set, etcd updates the key using its current lease.
// Returns an error if the key does not exist.
IgnoreLease bool `protobuf:"varint,6,opt,name=ignore_lease,json=ignoreLease,proto3" json:"ignore_lease,omitempty"`
}
func (m *PutRequest) Reset() { *m = PutRequest{} }
func (m *PutRequest) String() string { return proto.CompactTextString(m) }
func (*PutRequest) ProtoMessage() {}
func (*PutRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{3} }
func (m *PutRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *PutRequest) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func (m *PutRequest) GetLease() int64 {
if m != nil {
return m.Lease
}
return 0
}
func (m *PutRequest) GetPrevKv() bool {
if m != nil {
return m.PrevKv
}
return false
}
func (m *PutRequest) GetIgnoreValue() bool {
if m != nil {
return m.IgnoreValue
}
return false
}
func (m *PutRequest) GetIgnoreLease() bool {
if m != nil {
return m.IgnoreLease
}
return false
}
type PutResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// if prev_kv is set in the request, the previous key-value pair will be returned.
PrevKv *mvccpb.KeyValue `protobuf:"bytes,2,opt,name=prev_kv,json=prevKv" json:"prev_kv,omitempty"`
}
func (m *PutResponse) Reset() { *m = PutResponse{} }
func (m *PutResponse) String() string { return proto.CompactTextString(m) }
func (*PutResponse) ProtoMessage() {}
func (*PutResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{4} }
func (m *PutResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *PutResponse) GetPrevKv() *mvccpb.KeyValue {
if m != nil {
return m.PrevKv
}
return nil
}
type DeleteRangeRequest struct {
// key is the first key to delete in the range.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// range_end is the key following the last key to delete for the range [key, range_end).
// If range_end is not given, the range is defined to contain only the key argument.
// If range_end is one bit larger than the given key, then the range is all the keys
// with the prefix (the given key).
// If range_end is '\0', the range is all keys greater than or equal to the key argument.
RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
// If prev_kv is set, etcd gets the previous key-value pairs before deleting it.
// The previous key-value pairs will be returned in the delete response.
PrevKv bool `protobuf:"varint,3,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"`
}
func (m *DeleteRangeRequest) Reset() { *m = DeleteRangeRequest{} }
func (m *DeleteRangeRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteRangeRequest) ProtoMessage() {}
func (*DeleteRangeRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{5} }
func (m *DeleteRangeRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *DeleteRangeRequest) GetRangeEnd() []byte {
if m != nil {
return m.RangeEnd
}
return nil
}
func (m *DeleteRangeRequest) GetPrevKv() bool {
if m != nil {
return m.PrevKv
}
return false
}
type DeleteRangeResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// deleted is the number of keys deleted by the delete range request.
Deleted int64 `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
// if prev_kv is set in the request, the previous key-value pairs will be returned.
PrevKvs []*mvccpb.KeyValue `protobuf:"bytes,3,rep,name=prev_kvs,json=prevKvs" json:"prev_kvs,omitempty"`
}
func (m *DeleteRangeResponse) Reset() { *m = DeleteRangeResponse{} }
func (m *DeleteRangeResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteRangeResponse) ProtoMessage() {}
func (*DeleteRangeResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{6} }
func (m *DeleteRangeResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *DeleteRangeResponse) GetDeleted() int64 {
if m != nil {
return m.Deleted
}
return 0
}
func (m *DeleteRangeResponse) GetPrevKvs() []*mvccpb.KeyValue {
if m != nil {
return m.PrevKvs
}
return nil
}
type RequestOp struct {
// request is a union of request types accepted by a transaction.
//
// Types that are valid to be assigned to Request:
// *RequestOp_RequestRange
// *RequestOp_RequestPut
// *RequestOp_RequestDeleteRange
// *RequestOp_RequestTxn
Request isRequestOp_Request `protobuf_oneof:"request"`
}
func (m *RequestOp) Reset() { *m = RequestOp{} }
func (m *RequestOp) String() string { return proto.CompactTextString(m) }
func (*RequestOp) ProtoMessage() {}
func (*RequestOp) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{7} }
type isRequestOp_Request interface {
isRequestOp_Request()
MarshalTo([]byte) (int, error)
Size() int
}
type RequestOp_RequestRange struct {
RequestRange *RangeRequest `protobuf:"bytes,1,opt,name=request_range,json=requestRange,oneof"`
}
type RequestOp_RequestPut struct {
RequestPut *PutRequest `protobuf:"bytes,2,opt,name=request_put,json=requestPut,oneof"`
}
type RequestOp_RequestDeleteRange struct {
RequestDeleteRange *DeleteRangeRequest `protobuf:"bytes,3,opt,name=request_delete_range,json=requestDeleteRange,oneof"`
}
type RequestOp_RequestTxn struct {
RequestTxn *TxnRequest `protobuf:"bytes,4,opt,name=request_txn,json=requestTxn,oneof"`
}
func (*RequestOp_RequestRange) isRequestOp_Request() {}
func (*RequestOp_RequestPut) isRequestOp_Request() {}
func (*RequestOp_RequestDeleteRange) isRequestOp_Request() {}
func (*RequestOp_RequestTxn) isRequestOp_Request() {}
func (m *RequestOp) GetRequest() isRequestOp_Request {
if m != nil {
return m.Request
}
return nil
}
func (m *RequestOp) GetRequestRange() *RangeRequest {
if x, ok := m.GetRequest().(*RequestOp_RequestRange); ok {
return x.RequestRange
}
return nil
}
func (m *RequestOp) GetRequestPut() *PutRequest {
if x, ok := m.GetRequest().(*RequestOp_RequestPut); ok {
return x.RequestPut
}
return nil
}
func (m *RequestOp) GetRequestDeleteRange() *DeleteRangeRequest {
if x, ok := m.GetRequest().(*RequestOp_RequestDeleteRange); ok {
return x.RequestDeleteRange
}
return nil
}
func (m *RequestOp) GetRequestTxn() *TxnRequest {
if x, ok := m.GetRequest().(*RequestOp_RequestTxn); ok {
return x.RequestTxn
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*RequestOp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _RequestOp_OneofMarshaler, _RequestOp_OneofUnmarshaler, _RequestOp_OneofSizer, []interface{}{
(*RequestOp_RequestRange)(nil),
(*RequestOp_RequestPut)(nil),
(*RequestOp_RequestDeleteRange)(nil),
(*RequestOp_RequestTxn)(nil),
}
}
func _RequestOp_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*RequestOp)
// request
switch x := m.Request.(type) {
case *RequestOp_RequestRange:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RequestRange); err != nil {
return err
}
case *RequestOp_RequestPut:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RequestPut); err != nil {
return err
}
case *RequestOp_RequestDeleteRange:
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RequestDeleteRange); err != nil {
return err
}
case *RequestOp_RequestTxn:
_ = b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RequestTxn); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("RequestOp.Request has unexpected type %T", x)
}
return nil
}
func _RequestOp_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*RequestOp)
switch tag {
case 1: // request.request_range
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(RangeRequest)
err := b.DecodeMessage(msg)
m.Request = &RequestOp_RequestRange{msg}
return true, err
case 2: // request.request_put
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(PutRequest)
err := b.DecodeMessage(msg)
m.Request = &RequestOp_RequestPut{msg}
return true, err
case 3: // request.request_delete_range
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(DeleteRangeRequest)
err := b.DecodeMessage(msg)
m.Request = &RequestOp_RequestDeleteRange{msg}
return true, err
case 4: // request.request_txn
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TxnRequest)
err := b.DecodeMessage(msg)
m.Request = &RequestOp_RequestTxn{msg}
return true, err
default:
return false, nil
}
}
func _RequestOp_OneofSizer(msg proto.Message) (n int) {
m := msg.(*RequestOp)
// request
switch x := m.Request.(type) {
case *RequestOp_RequestRange:
s := proto.Size(x.RequestRange)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *RequestOp_RequestPut:
s := proto.Size(x.RequestPut)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *RequestOp_RequestDeleteRange:
s := proto.Size(x.RequestDeleteRange)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *RequestOp_RequestTxn:
s := proto.Size(x.RequestTxn)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type ResponseOp struct {
// response is a union of response types returned by a transaction.
//
// Types that are valid to be assigned to Response:
// *ResponseOp_ResponseRange
// *ResponseOp_ResponsePut
// *ResponseOp_ResponseDeleteRange
// *ResponseOp_ResponseTxn
Response isResponseOp_Response `protobuf_oneof:"response"`
}
func (m *ResponseOp) Reset() { *m = ResponseOp{} }
func (m *ResponseOp) String() string { return proto.CompactTextString(m) }
func (*ResponseOp) ProtoMessage() {}
func (*ResponseOp) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{8} }
type isResponseOp_Response interface {
isResponseOp_Response()
MarshalTo([]byte) (int, error)
Size() int
}
type ResponseOp_ResponseRange struct {
ResponseRange *RangeResponse `protobuf:"bytes,1,opt,name=response_range,json=responseRange,oneof"`
}
type ResponseOp_ResponsePut struct {
ResponsePut *PutResponse `protobuf:"bytes,2,opt,name=response_put,json=responsePut,oneof"`
}
type ResponseOp_ResponseDeleteRange struct {
ResponseDeleteRange *DeleteRangeResponse `protobuf:"bytes,3,opt,name=response_delete_range,json=responseDeleteRange,oneof"`
}
type ResponseOp_ResponseTxn struct {
ResponseTxn *TxnResponse `protobuf:"bytes,4,opt,name=response_txn,json=responseTxn,oneof"`
}
func (*ResponseOp_ResponseRange) isResponseOp_Response() {}
func (*ResponseOp_ResponsePut) isResponseOp_Response() {}
func (*ResponseOp_ResponseDeleteRange) isResponseOp_Response() {}
func (*ResponseOp_ResponseTxn) isResponseOp_Response() {}
func (m *ResponseOp) GetResponse() isResponseOp_Response {
if m != nil {
return m.Response
}
return nil
}
func (m *ResponseOp) GetResponseRange() *RangeResponse {
if x, ok := m.GetResponse().(*ResponseOp_ResponseRange); ok {
return x.ResponseRange
}
return nil
}
func (m *ResponseOp) GetResponsePut() *PutResponse {
if x, ok := m.GetResponse().(*ResponseOp_ResponsePut); ok {
return x.ResponsePut
}
return nil
}
func (m *ResponseOp) GetResponseDeleteRange() *DeleteRangeResponse {
if x, ok := m.GetResponse().(*ResponseOp_ResponseDeleteRange); ok {
return x.ResponseDeleteRange
}
return nil
}
func (m *ResponseOp) GetResponseTxn() *TxnResponse {
if x, ok := m.GetResponse().(*ResponseOp_ResponseTxn); ok {
return x.ResponseTxn
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ResponseOp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _ResponseOp_OneofMarshaler, _ResponseOp_OneofUnmarshaler, _ResponseOp_OneofSizer, []interface{}{
(*ResponseOp_ResponseRange)(nil),
(*ResponseOp_ResponsePut)(nil),
(*ResponseOp_ResponseDeleteRange)(nil),
(*ResponseOp_ResponseTxn)(nil),
}
}
func _ResponseOp_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*ResponseOp)
// response
switch x := m.Response.(type) {
case *ResponseOp_ResponseRange:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ResponseRange); err != nil {
return err
}
case *ResponseOp_ResponsePut:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ResponsePut); err != nil {
return err
}
case *ResponseOp_ResponseDeleteRange:
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ResponseDeleteRange); err != nil {
return err
}
case *ResponseOp_ResponseTxn:
_ = b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ResponseTxn); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("ResponseOp.Response has unexpected type %T", x)
}
return nil
}
func _ResponseOp_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*ResponseOp)
switch tag {
case 1: // response.response_range
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(RangeResponse)
err := b.DecodeMessage(msg)
m.Response = &ResponseOp_ResponseRange{msg}
return true, err
case 2: // response.response_put
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(PutResponse)
err := b.DecodeMessage(msg)
m.Response = &ResponseOp_ResponsePut{msg}
return true, err
case 3: // response.response_delete_range
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(DeleteRangeResponse)
err := b.DecodeMessage(msg)
m.Response = &ResponseOp_ResponseDeleteRange{msg}
return true, err
case 4: // response.response_txn
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TxnResponse)
err := b.DecodeMessage(msg)
m.Response = &ResponseOp_ResponseTxn{msg}
return true, err
default:
return false, nil
}
}
func _ResponseOp_OneofSizer(msg proto.Message) (n int) {
m := msg.(*ResponseOp)
// response
switch x := m.Response.(type) {
case *ResponseOp_ResponseRange:
s := proto.Size(x.ResponseRange)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *ResponseOp_ResponsePut:
s := proto.Size(x.ResponsePut)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *ResponseOp_ResponseDeleteRange:
s := proto.Size(x.ResponseDeleteRange)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *ResponseOp_ResponseTxn:
s := proto.Size(x.ResponseTxn)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type Compare struct {
// result is logical comparison operation for this comparison.
Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=etcdserverpb.Compare_CompareResult" json:"result,omitempty"`
// target is the key-value field to inspect for the comparison.
Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=etcdserverpb.Compare_CompareTarget" json:"target,omitempty"`
// key is the subject key for the comparison operation.
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
// *Compare_Lease
TargetUnion isCompare_TargetUnion `protobuf_oneof:"target_union"`
// range_end compares the given target to all keys in the range [key, range_end).
// See RangeRequest for more details on key ranges.
RangeEnd []byte `protobuf:"bytes,64,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
}
func (m *Compare) Reset() { *m = Compare{} }
func (m *Compare) String() string { return proto.CompactTextString(m) }
func (*Compare) ProtoMessage() {}
func (*Compare) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{9} }
type isCompare_TargetUnion interface {
isCompare_TargetUnion()
MarshalTo([]byte) (int, error)
Size() int
}
type Compare_Version struct {
Version int64 `protobuf:"varint,4,opt,name=version,proto3,oneof"`
}
type Compare_CreateRevision struct {
CreateRevision int64 `protobuf:"varint,5,opt,name=create_revision,json=createRevision,proto3,oneof"`
}
type Compare_ModRevision struct {
ModRevision int64 `protobuf:"varint,6,opt,name=mod_revision,json=modRevision,proto3,oneof"`
}
type Compare_Value struct {
Value []byte `protobuf:"bytes,7,opt,name=value,proto3,oneof"`
}
type Compare_Lease struct {
Lease int64 `protobuf:"varint,8,opt,name=lease,proto3,oneof"`
}
func (*Compare_Version) isCompare_TargetUnion() {}
func (*Compare_CreateRevision) isCompare_TargetUnion() {}
func (*Compare_ModRevision) isCompare_TargetUnion() {}
func (*Compare_Value) isCompare_TargetUnion() {}
func (*Compare_Lease) isCompare_TargetUnion() {}
func (m *Compare) GetTargetUnion() isCompare_TargetUnion {
if m != nil {
return m.TargetUnion
}
return nil
}
func (m *Compare) GetResult() Compare_CompareResult {
if m != nil {
return m.Result
}
return Compare_EQUAL
}
func (m *Compare) GetTarget() Compare_CompareTarget {
if m != nil {
return m.Target
}
return Compare_VERSION
}
func (m *Compare) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *Compare) GetVersion() int64 {
if x, ok := m.GetTargetUnion().(*Compare_Version); ok {
return x.Version
}
return 0
}
func (m *Compare) GetCreateRevision() int64 {
if x, ok := m.GetTargetUnion().(*Compare_CreateRevision); ok {
return x.CreateRevision
}
return 0
}
func (m *Compare) GetModRevision() int64 {
if x, ok := m.GetTargetUnion().(*Compare_ModRevision); ok {
return x.ModRevision
}
return 0
}
func (m *Compare) GetValue() []byte {
if x, ok := m.GetTargetUnion().(*Compare_Value); ok {
return x.Value
}
return nil
}
func (m *Compare) GetLease() int64 {
if x, ok := m.GetTargetUnion().(*Compare_Lease); ok {
return x.Lease
}
return 0
}
func (m *Compare) GetRangeEnd() []byte {
if m != nil {
return m.RangeEnd
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Compare) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Compare_OneofMarshaler, _Compare_OneofUnmarshaler, _Compare_OneofSizer, []interface{}{
(*Compare_Version)(nil),
(*Compare_CreateRevision)(nil),
(*Compare_ModRevision)(nil),
(*Compare_Value)(nil),
(*Compare_Lease)(nil),
}
}
func _Compare_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Compare)
// target_union
switch x := m.TargetUnion.(type) {
case *Compare_Version:
_ = b.EncodeVarint(4<<3 | proto.WireVarint)
_ = b.EncodeVarint(uint64(x.Version))
case *Compare_CreateRevision:
_ = b.EncodeVarint(5<<3 | proto.WireVarint)
_ = b.EncodeVarint(uint64(x.CreateRevision))
case *Compare_ModRevision:
_ = b.EncodeVarint(6<<3 | proto.WireVarint)
_ = b.EncodeVarint(uint64(x.ModRevision))
case *Compare_Value:
_ = b.EncodeVarint(7<<3 | proto.WireBytes)
_ = b.EncodeRawBytes(x.Value)
case *Compare_Lease:
_ = b.EncodeVarint(8<<3 | proto.WireVarint)
_ = b.EncodeVarint(uint64(x.Lease))
case nil:
default:
return fmt.Errorf("Compare.TargetUnion has unexpected type %T", x)
}
return nil
}
func _Compare_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Compare)
switch tag {
case 4: // target_union.version
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.TargetUnion = &Compare_Version{int64(x)}
return true, err
case 5: // target_union.create_revision
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.TargetUnion = &Compare_CreateRevision{int64(x)}
return true, err
case 6: // target_union.mod_revision
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.TargetUnion = &Compare_ModRevision{int64(x)}
return true, err
case 7: // target_union.value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
m.TargetUnion = &Compare_Value{x}
return true, err
case 8: // target_union.lease
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.TargetUnion = &Compare_Lease{int64(x)}
return true, err
default:
return false, nil
}
}
func _Compare_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Compare)
// target_union
switch x := m.TargetUnion.(type) {
case *Compare_Version:
n += proto.SizeVarint(4<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.Version))
case *Compare_CreateRevision:
n += proto.SizeVarint(5<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.CreateRevision))
case *Compare_ModRevision:
n += proto.SizeVarint(6<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.ModRevision))
case *Compare_Value:
n += proto.SizeVarint(7<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Value)))
n += len(x.Value)
case *Compare_Lease:
n += proto.SizeVarint(8<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.Lease))
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// 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.
type TxnRequest struct {
// compare is a list of predicates representing a conjunction of terms.
// If the comparisons succeed, then the success requests will be processed in order,
// and the response will contain their respective responses in order.
// If the comparisons fail, then the failure requests will be processed in order,
// and the response will contain their respective responses in order.
Compare []*Compare `protobuf:"bytes,1,rep,name=compare" json:"compare,omitempty"`
// success is a list of requests which will be applied when compare evaluates to true.
Success []*RequestOp `protobuf:"bytes,2,rep,name=success" json:"success,omitempty"`
// failure is a list of requests which will be applied when compare evaluates to false.
Failure []*RequestOp `protobuf:"bytes,3,rep,name=failure" json:"failure,omitempty"`
}
func (m *TxnRequest) Reset() { *m = TxnRequest{} }
func (m *TxnRequest) String() string { return proto.CompactTextString(m) }
func (*TxnRequest) ProtoMessage() {}
func (*TxnRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{10} }
func (m *TxnRequest) GetCompare() []*Compare {
if m != nil {
return m.Compare
}
return nil
}
func (m *TxnRequest) GetSuccess() []*RequestOp {
if m != nil {
return m.Success
}
return nil
}
func (m *TxnRequest) GetFailure() []*RequestOp {
if m != nil {
return m.Failure
}
return nil
}
type TxnResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// succeeded is set to true if the compare evaluated to true or false otherwise.
Succeeded bool `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
// responses is a list of responses corresponding to the results from applying
// success if succeeded is true or failure if succeeded is false.
Responses []*ResponseOp `protobuf:"bytes,3,rep,name=responses" json:"responses,omitempty"`
}
func (m *TxnResponse) Reset() { *m = TxnResponse{} }
func (m *TxnResponse) String() string { return proto.CompactTextString(m) }
func (*TxnResponse) ProtoMessage() {}
func (*TxnResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{11} }
func (m *TxnResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *TxnResponse) GetSucceeded() bool {
if m != nil {
return m.Succeeded
}
return false
}
func (m *TxnResponse) GetResponses() []*ResponseOp {
if m != nil {
return m.Responses
}
return nil
}
// CompactionRequest compacts the key-value store up to a given revision. All superseded keys
// with a revision less than the compaction revision will be removed.
type CompactionRequest struct {
// revision is the key-value store revision for the compaction operation.
Revision int64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
// physical is set so the RPC will wait until the compaction is physically
// applied to the local database such that compacted entries are totally
// removed from the backend database.
Physical bool `protobuf:"varint,2,opt,name=physical,proto3" json:"physical,omitempty"`
}
func (m *CompactionRequest) Reset() { *m = CompactionRequest{} }
func (m *CompactionRequest) String() string { return proto.CompactTextString(m) }
func (*CompactionRequest) ProtoMessage() {}
func (*CompactionRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{12} }
func (m *CompactionRequest) GetRevision() int64 {
if m != nil {
return m.Revision
}
return 0
}
func (m *CompactionRequest) GetPhysical() bool {
if m != nil {
return m.Physical
}
return false
}
type CompactionResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *CompactionResponse) Reset() { *m = CompactionResponse{} }
func (m *CompactionResponse) String() string { return proto.CompactTextString(m) }
func (*CompactionResponse) ProtoMessage() {}
func (*CompactionResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{13} }
func (m *CompactionResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type HashRequest struct {
}
func (m *HashRequest) Reset() { *m = HashRequest{} }
func (m *HashRequest) String() string { return proto.CompactTextString(m) }
func (*HashRequest) ProtoMessage() {}
func (*HashRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{14} }
type HashKVRequest struct {
// revision is the key-value store revision for the hash operation.
Revision int64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
}
func (m *HashKVRequest) Reset() { *m = HashKVRequest{} }
func (m *HashKVRequest) String() string { return proto.CompactTextString(m) }
func (*HashKVRequest) ProtoMessage() {}
func (*HashKVRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{15} }
func (m *HashKVRequest) GetRevision() int64 {
if m != nil {
return m.Revision
}
return 0
}
type HashKVResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// hash is the hash value computed from the responding member's MVCC keys up to a given revision.
Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"`
// compact_revision is the compacted revision of key-value store when hash begins.
CompactRevision int64 `protobuf:"varint,3,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"`
}
func (m *HashKVResponse) Reset() { *m = HashKVResponse{} }
func (m *HashKVResponse) String() string { return proto.CompactTextString(m) }
func (*HashKVResponse) ProtoMessage() {}
func (*HashKVResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{16} }
func (m *HashKVResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *HashKVResponse) GetHash() uint32 {
if m != nil {
return m.Hash
}
return 0
}
func (m *HashKVResponse) GetCompactRevision() int64 {
if m != nil {
return m.CompactRevision
}
return 0
}
type HashResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// hash is the hash value computed from the responding member's KV's backend.
Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"`
}
func (m *HashResponse) Reset() { *m = HashResponse{} }
func (m *HashResponse) String() string { return proto.CompactTextString(m) }
func (*HashResponse) ProtoMessage() {}
func (*HashResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{17} }
func (m *HashResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *HashResponse) GetHash() uint32 {
if m != nil {
return m.Hash
}
return 0
}
type SnapshotRequest struct {
}
func (m *SnapshotRequest) Reset() { *m = SnapshotRequest{} }
func (m *SnapshotRequest) String() string { return proto.CompactTextString(m) }
func (*SnapshotRequest) ProtoMessage() {}
func (*SnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{18} }
type SnapshotResponse struct {
// header has the current key-value store information. The first header in the snapshot
// stream indicates the point in time of the snapshot.
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// remaining_bytes is the number of blob bytes to be sent after this message
RemainingBytes uint64 `protobuf:"varint,2,opt,name=remaining_bytes,json=remainingBytes,proto3" json:"remaining_bytes,omitempty"`
// blob contains the next chunk of the snapshot in the snapshot stream.
Blob []byte `protobuf:"bytes,3,opt,name=blob,proto3" json:"blob,omitempty"`
}
func (m *SnapshotResponse) Reset() { *m = SnapshotResponse{} }
func (m *SnapshotResponse) String() string { return proto.CompactTextString(m) }
func (*SnapshotResponse) ProtoMessage() {}
func (*SnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{19} }
func (m *SnapshotResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *SnapshotResponse) GetRemainingBytes() uint64 {
if m != nil {
return m.RemainingBytes
}
return 0
}
func (m *SnapshotResponse) GetBlob() []byte {
if m != nil {
return m.Blob
}
return nil
}
type WatchRequest struct {
// request_union is a request to either create a new watcher or cancel an existing watcher.
//
// Types that are valid to be assigned to RequestUnion:
// *WatchRequest_CreateRequest
// *WatchRequest_CancelRequest
// *WatchRequest_ProgressRequest
RequestUnion isWatchRequest_RequestUnion `protobuf_oneof:"request_union"`
}
func (m *WatchRequest) Reset() { *m = WatchRequest{} }
func (m *WatchRequest) String() string { return proto.CompactTextString(m) }
func (*WatchRequest) ProtoMessage() {}
func (*WatchRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{20} }
type isWatchRequest_RequestUnion interface {
isWatchRequest_RequestUnion()
MarshalTo([]byte) (int, error)
Size() int
}
type WatchRequest_CreateRequest struct {
CreateRequest *WatchCreateRequest `protobuf:"bytes,1,opt,name=create_request,json=createRequest,oneof"`
}
type WatchRequest_CancelRequest struct {
CancelRequest *WatchCancelRequest `protobuf:"bytes,2,opt,name=cancel_request,json=cancelRequest,oneof"`
}
type WatchRequest_ProgressRequest struct {
ProgressRequest *WatchProgressRequest `protobuf:"bytes,3,opt,name=progress_request,json=progressRequest,oneof"`
}
func (*WatchRequest_CreateRequest) isWatchRequest_RequestUnion() {}
func (*WatchRequest_CancelRequest) isWatchRequest_RequestUnion() {}
func (*WatchRequest_ProgressRequest) isWatchRequest_RequestUnion() {}
func (m *WatchRequest) GetRequestUnion() isWatchRequest_RequestUnion {
if m != nil {
return m.RequestUnion
}
return nil
}
func (m *WatchRequest) GetCreateRequest() *WatchCreateRequest {
if x, ok := m.GetRequestUnion().(*WatchRequest_CreateRequest); ok {
return x.CreateRequest
}
return nil
}
func (m *WatchRequest) GetCancelRequest() *WatchCancelRequest {
if x, ok := m.GetRequestUnion().(*WatchRequest_CancelRequest); ok {
return x.CancelRequest
}
return nil
}
func (m *WatchRequest) GetProgressRequest() *WatchProgressRequest {
if x, ok := m.GetRequestUnion().(*WatchRequest_ProgressRequest); ok {
return x.ProgressRequest
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*WatchRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _WatchRequest_OneofMarshaler, _WatchRequest_OneofUnmarshaler, _WatchRequest_OneofSizer, []interface{}{
(*WatchRequest_CreateRequest)(nil),
(*WatchRequest_CancelRequest)(nil),
(*WatchRequest_ProgressRequest)(nil),
}
}
func _WatchRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*WatchRequest)
// request_union
switch x := m.RequestUnion.(type) {
case *WatchRequest_CreateRequest:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.CreateRequest); err != nil {
return err
}
case *WatchRequest_CancelRequest:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.CancelRequest); err != nil {
return err
}
case *WatchRequest_ProgressRequest:
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ProgressRequest); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("WatchRequest.RequestUnion has unexpected type %T", x)
}
return nil
}
func _WatchRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*WatchRequest)
switch tag {
case 1: // request_union.create_request
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(WatchCreateRequest)
err := b.DecodeMessage(msg)
m.RequestUnion = &WatchRequest_CreateRequest{msg}
return true, err
case 2: // request_union.cancel_request
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(WatchCancelRequest)
err := b.DecodeMessage(msg)
m.RequestUnion = &WatchRequest_CancelRequest{msg}
return true, err
case 3: // request_union.progress_request
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(WatchProgressRequest)
err := b.DecodeMessage(msg)
m.RequestUnion = &WatchRequest_ProgressRequest{msg}
return true, err
default:
return false, nil
}
}
func _WatchRequest_OneofSizer(msg proto.Message) (n int) {
m := msg.(*WatchRequest)
// request_union
switch x := m.RequestUnion.(type) {
case *WatchRequest_CreateRequest:
s := proto.Size(x.CreateRequest)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *WatchRequest_CancelRequest:
s := proto.Size(x.CancelRequest)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *WatchRequest_ProgressRequest:
s := proto.Size(x.ProgressRequest)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type WatchCreateRequest struct {
// key is the key to register for watching.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// range_end is the end of the range [key, range_end) to watch. If range_end is not given,
// only the key argument is watched. If range_end is equal to '\0', all keys greater than
// or equal to the key argument are watched.
// If the range_end is one bit larger than the given key,
// then all keys with the prefix (the given key) will be watched.
RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
// start_revision is an optional revision to watch from (inclusive). No start_revision is "now".
StartRevision int64 `protobuf:"varint,3,opt,name=start_revision,json=startRevision,proto3" json:"start_revision,omitempty"`
// progress_notify is set so that the etcd server will periodically send a WatchResponse with
// no events to the new watcher if there are no recent events. It is useful when clients
// wish to recover a disconnected watcher starting from a recent known revision.
// The etcd server may decide how often it will send notifications based on current load.
ProgressNotify bool `protobuf:"varint,4,opt,name=progress_notify,json=progressNotify,proto3" json:"progress_notify,omitempty"`
// filters filter the events at server side before it sends back to the watcher.
Filters []WatchCreateRequest_FilterType `protobuf:"varint,5,rep,packed,name=filters,enum=etcdserverpb.WatchCreateRequest_FilterType" json:"filters,omitempty"`
// If prev_kv is set, created watcher gets the previous KV before the event happens.
// If the previous KV is already compacted, nothing will be returned.
PrevKv bool `protobuf:"varint,6,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"`
// If watch_id is provided and non-zero, it will be assigned to this watcher.
// Since creating a watcher in etcd is not a synchronous operation,
// this can be used ensure that ordering is correct when creating multiple
// watchers on the same stream. Creating a watcher with an ID already in
// use on the stream will cause an error to be returned.
WatchId int64 `protobuf:"varint,7,opt,name=watch_id,json=watchId,proto3" json:"watch_id,omitempty"`
// fragment enables splitting large revisions into multiple watch responses.
Fragment bool `protobuf:"varint,8,opt,name=fragment,proto3" json:"fragment,omitempty"`
}
func (m *WatchCreateRequest) Reset() { *m = WatchCreateRequest{} }
func (m *WatchCreateRequest) String() string { return proto.CompactTextString(m) }
func (*WatchCreateRequest) ProtoMessage() {}
func (*WatchCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{21} }
func (m *WatchCreateRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *WatchCreateRequest) GetRangeEnd() []byte {
if m != nil {
return m.RangeEnd
}
return nil
}
func (m *WatchCreateRequest) GetStartRevision() int64 {
if m != nil {
return m.StartRevision
}
return 0
}
func (m *WatchCreateRequest) GetProgressNotify() bool {
if m != nil {
return m.ProgressNotify
}
return false
}
func (m *WatchCreateRequest) GetFilters() []WatchCreateRequest_FilterType {
if m != nil {
return m.Filters
}
return nil
}
func (m *WatchCreateRequest) GetPrevKv() bool {
if m != nil {
return m.PrevKv
}
return false
}
func (m *WatchCreateRequest) GetWatchId() int64 {
if m != nil {
return m.WatchId
}
return 0
}
func (m *WatchCreateRequest) GetFragment() bool {
if m != nil {
return m.Fragment
}
return false
}
type WatchCancelRequest struct {
// watch_id is the watcher id to cancel so that no more events are transmitted.
WatchId int64 `protobuf:"varint,1,opt,name=watch_id,json=watchId,proto3" json:"watch_id,omitempty"`
}
func (m *WatchCancelRequest) Reset() { *m = WatchCancelRequest{} }
func (m *WatchCancelRequest) String() string { return proto.CompactTextString(m) }
func (*WatchCancelRequest) ProtoMessage() {}
func (*WatchCancelRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{22} }
func (m *WatchCancelRequest) GetWatchId() int64 {
if m != nil {
return m.WatchId
}
return 0
}
// Requests the a watch stream progress status be sent in the watch response stream as soon as
// possible.
type WatchProgressRequest struct {
}
func (m *WatchProgressRequest) Reset() { *m = WatchProgressRequest{} }
func (m *WatchProgressRequest) String() string { return proto.CompactTextString(m) }
func (*WatchProgressRequest) ProtoMessage() {}
func (*WatchProgressRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{23} }
type WatchResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// watch_id is the ID of the watcher that corresponds to the response.
WatchId int64 `protobuf:"varint,2,opt,name=watch_id,json=watchId,proto3" json:"watch_id,omitempty"`
// created is set to true if the response is for a create watch request.
// The client should record the watch_id and expect to receive events for
// the created watcher from the same stream.
// All events sent to the created watcher will attach with the same watch_id.
Created bool `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
// canceled is set to true if the response is for a cancel watch request.
// No further events will be sent to the canceled watcher.
Canceled bool `protobuf:"varint,4,opt,name=canceled,proto3" json:"canceled,omitempty"`
// compact_revision is set to the minimum index if a watcher tries to watch
// at a compacted index.
//
// This happens when creating a watcher at a compacted revision or the watcher cannot
// catch up with the progress of the key-value store.
//
// The client should treat the watcher as canceled and should not try to create any
// watcher with the same start_revision again.
CompactRevision int64 `protobuf:"varint,5,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"`
// cancel_reason indicates the reason for canceling the watcher.
CancelReason string `protobuf:"bytes,6,opt,name=cancel_reason,json=cancelReason,proto3" json:"cancel_reason,omitempty"`
// framgment is true if large watch response was split over multiple responses.
Fragment bool `protobuf:"varint,7,opt,name=fragment,proto3" json:"fragment,omitempty"`
Events []*mvccpb.Event `protobuf:"bytes,11,rep,name=events" json:"events,omitempty"`
}
func (m *WatchResponse) Reset() { *m = WatchResponse{} }
func (m *WatchResponse) String() string { return proto.CompactTextString(m) }
func (*WatchResponse) ProtoMessage() {}
func (*WatchResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{24} }
func (m *WatchResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *WatchResponse) GetWatchId() int64 {
if m != nil {
return m.WatchId
}
return 0
}
func (m *WatchResponse) GetCreated() bool {
if m != nil {
return m.Created
}
return false
}
func (m *WatchResponse) GetCanceled() bool {
if m != nil {
return m.Canceled
}
return false
}
func (m *WatchResponse) GetCompactRevision() int64 {
if m != nil {
return m.CompactRevision
}
return 0
}
func (m *WatchResponse) GetCancelReason() string {
if m != nil {
return m.CancelReason
}
return ""
}
func (m *WatchResponse) GetFragment() bool {
if m != nil {
return m.Fragment
}
return false
}
func (m *WatchResponse) GetEvents() []*mvccpb.Event {
if m != nil {
return m.Events
}
return nil
}
type LeaseGrantRequest struct {
// TTL is the advisory time-to-live in seconds. Expired lease will return -1.
TTL int64 `protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"`
// ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID.
ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (m *LeaseGrantRequest) Reset() { *m = LeaseGrantRequest{} }
func (m *LeaseGrantRequest) String() string { return proto.CompactTextString(m) }
func (*LeaseGrantRequest) ProtoMessage() {}
func (*LeaseGrantRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{25} }
func (m *LeaseGrantRequest) GetTTL() int64 {
if m != nil {
return m.TTL
}
return 0
}
func (m *LeaseGrantRequest) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
type LeaseGrantResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// ID is the lease ID for the granted lease.
ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
// TTL is the server chosen lease time-to-live in seconds.
TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"`
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
}
func (m *LeaseGrantResponse) Reset() { *m = LeaseGrantResponse{} }
func (m *LeaseGrantResponse) String() string { return proto.CompactTextString(m) }
func (*LeaseGrantResponse) ProtoMessage() {}
func (*LeaseGrantResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{26} }
func (m *LeaseGrantResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *LeaseGrantResponse) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *LeaseGrantResponse) GetTTL() int64 {
if m != nil {
return m.TTL
}
return 0
}
func (m *LeaseGrantResponse) GetError() string {
if m != nil {
return m.Error
}
return ""
}
type LeaseRevokeRequest struct {
// ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted.
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (m *LeaseRevokeRequest) Reset() { *m = LeaseRevokeRequest{} }
func (m *LeaseRevokeRequest) String() string { return proto.CompactTextString(m) }
func (*LeaseRevokeRequest) ProtoMessage() {}
func (*LeaseRevokeRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{27} }
func (m *LeaseRevokeRequest) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
type LeaseRevokeResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *LeaseRevokeResponse) Reset() { *m = LeaseRevokeResponse{} }
func (m *LeaseRevokeResponse) String() string { return proto.CompactTextString(m) }
func (*LeaseRevokeResponse) ProtoMessage() {}
func (*LeaseRevokeResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{28} }
func (m *LeaseRevokeResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type LeaseCheckpoint struct {
// ID is the lease ID to checkpoint.
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
// Remaining_TTL is the remaining time until expiry of the lease.
Remaining_TTL int64 `protobuf:"varint,2,opt,name=remaining_TTL,json=remainingTTL,proto3" json:"remaining_TTL,omitempty"`
}
func (m *LeaseCheckpoint) Reset() { *m = LeaseCheckpoint{} }
func (m *LeaseCheckpoint) String() string { return proto.CompactTextString(m) }
func (*LeaseCheckpoint) ProtoMessage() {}
func (*LeaseCheckpoint) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{29} }
func (m *LeaseCheckpoint) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *LeaseCheckpoint) GetRemaining_TTL() int64 {
if m != nil {
return m.Remaining_TTL
}
return 0
}
type LeaseCheckpointRequest struct {
Checkpoints []*LeaseCheckpoint `protobuf:"bytes,1,rep,name=checkpoints" json:"checkpoints,omitempty"`
}
func (m *LeaseCheckpointRequest) Reset() { *m = LeaseCheckpointRequest{} }
func (m *LeaseCheckpointRequest) String() string { return proto.CompactTextString(m) }
func (*LeaseCheckpointRequest) ProtoMessage() {}
func (*LeaseCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{30} }
func (m *LeaseCheckpointRequest) GetCheckpoints() []*LeaseCheckpoint {
if m != nil {
return m.Checkpoints
}
return nil
}
type LeaseCheckpointResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *LeaseCheckpointResponse) Reset() { *m = LeaseCheckpointResponse{} }
func (m *LeaseCheckpointResponse) String() string { return proto.CompactTextString(m) }
func (*LeaseCheckpointResponse) ProtoMessage() {}
func (*LeaseCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{31} }
func (m *LeaseCheckpointResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type LeaseKeepAliveRequest struct {
// ID is the lease ID for the lease to keep alive.
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (m *LeaseKeepAliveRequest) Reset() { *m = LeaseKeepAliveRequest{} }
func (m *LeaseKeepAliveRequest) String() string { return proto.CompactTextString(m) }
func (*LeaseKeepAliveRequest) ProtoMessage() {}
func (*LeaseKeepAliveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{32} }
func (m *LeaseKeepAliveRequest) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
type LeaseKeepAliveResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// ID is the lease ID from the keep alive request.
ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
// TTL is the new time-to-live for the lease.
TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"`
}
func (m *LeaseKeepAliveResponse) Reset() { *m = LeaseKeepAliveResponse{} }
func (m *LeaseKeepAliveResponse) String() string { return proto.CompactTextString(m) }
func (*LeaseKeepAliveResponse) ProtoMessage() {}
func (*LeaseKeepAliveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{33} }
func (m *LeaseKeepAliveResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *LeaseKeepAliveResponse) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *LeaseKeepAliveResponse) GetTTL() int64 {
if m != nil {
return m.TTL
}
return 0
}
type LeaseTimeToLiveRequest struct {
// ID is the lease ID for the lease.
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
// keys is true to query all the keys attached to this lease.
Keys bool `protobuf:"varint,2,opt,name=keys,proto3" json:"keys,omitempty"`
}
func (m *LeaseTimeToLiveRequest) Reset() { *m = LeaseTimeToLiveRequest{} }
func (m *LeaseTimeToLiveRequest) String() string { return proto.CompactTextString(m) }
func (*LeaseTimeToLiveRequest) ProtoMessage() {}
func (*LeaseTimeToLiveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{34} }
func (m *LeaseTimeToLiveRequest) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *LeaseTimeToLiveRequest) GetKeys() bool {
if m != nil {
return m.Keys
}
return false
}
type LeaseTimeToLiveResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// ID is the lease ID from the keep alive request.
ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
// TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds.
TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"`
// GrantedTTL is the initial granted time in seconds upon lease creation/renewal.
GrantedTTL int64 `protobuf:"varint,4,opt,name=grantedTTL,proto3" json:"grantedTTL,omitempty"`
// Keys is the list of keys attached to this lease.
Keys [][]byte `protobuf:"bytes,5,rep,name=keys" json:"keys,omitempty"`
}
func (m *LeaseTimeToLiveResponse) Reset() { *m = LeaseTimeToLiveResponse{} }
func (m *LeaseTimeToLiveResponse) String() string { return proto.CompactTextString(m) }
func (*LeaseTimeToLiveResponse) ProtoMessage() {}
func (*LeaseTimeToLiveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{35} }
func (m *LeaseTimeToLiveResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *LeaseTimeToLiveResponse) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *LeaseTimeToLiveResponse) GetTTL() int64 {
if m != nil {
return m.TTL
}
return 0
}
func (m *LeaseTimeToLiveResponse) GetGrantedTTL() int64 {
if m != nil {
return m.GrantedTTL
}
return 0
}
func (m *LeaseTimeToLiveResponse) GetKeys() [][]byte {
if m != nil {
return m.Keys
}
return nil
}
type LeaseLeasesRequest struct {
}
func (m *LeaseLeasesRequest) Reset() { *m = LeaseLeasesRequest{} }
func (m *LeaseLeasesRequest) String() string { return proto.CompactTextString(m) }
func (*LeaseLeasesRequest) ProtoMessage() {}
func (*LeaseLeasesRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{36} }
type LeaseStatus struct {
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (m *LeaseStatus) Reset() { *m = LeaseStatus{} }
func (m *LeaseStatus) String() string { return proto.CompactTextString(m) }
func (*LeaseStatus) ProtoMessage() {}
func (*LeaseStatus) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{37} }
func (m *LeaseStatus) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
type LeaseLeasesResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
Leases []*LeaseStatus `protobuf:"bytes,2,rep,name=leases" json:"leases,omitempty"`
}
func (m *LeaseLeasesResponse) Reset() { *m = LeaseLeasesResponse{} }
func (m *LeaseLeasesResponse) String() string { return proto.CompactTextString(m) }
func (*LeaseLeasesResponse) ProtoMessage() {}
func (*LeaseLeasesResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{38} }
func (m *LeaseLeasesResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *LeaseLeasesResponse) GetLeases() []*LeaseStatus {
if m != nil {
return m.Leases
}
return nil
}
type Member struct {
// ID is the member ID for this member.
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
// name is the human-readable name of the member. If the member is not started, the name will be an empty string.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// peerURLs is the list of URLs the member exposes to the cluster for communication.
PeerURLs []string `protobuf:"bytes,3,rep,name=peerURLs" json:"peerURLs,omitempty"`
// clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty.
ClientURLs []string `protobuf:"bytes,4,rep,name=clientURLs" json:"clientURLs,omitempty"`
// isLearner indicates if the member is raft learner.
IsLearner bool `protobuf:"varint,5,opt,name=isLearner,proto3" json:"isLearner,omitempty"`
}
func (m *Member) Reset() { *m = Member{} }
func (m *Member) String() string { return proto.CompactTextString(m) }
func (*Member) ProtoMessage() {}
func (*Member) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{39} }
func (m *Member) GetID() uint64 {
if m != nil {
return m.ID
}
return 0
}
func (m *Member) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Member) GetPeerURLs() []string {
if m != nil {
return m.PeerURLs
}
return nil
}
func (m *Member) GetClientURLs() []string {
if m != nil {
return m.ClientURLs
}
return nil
}
func (m *Member) GetIsLearner() bool {
if m != nil {
return m.IsLearner
}
return false
}
type MemberAddRequest struct {
// peerURLs is the list of URLs the added member will use to communicate with the cluster.
PeerURLs []string `protobuf:"bytes,1,rep,name=peerURLs" json:"peerURLs,omitempty"`
// isLearner indicates if the added member is raft learner.
IsLearner bool `protobuf:"varint,2,opt,name=isLearner,proto3" json:"isLearner,omitempty"`
}
func (m *MemberAddRequest) Reset() { *m = MemberAddRequest{} }
func (m *MemberAddRequest) String() string { return proto.CompactTextString(m) }
func (*MemberAddRequest) ProtoMessage() {}
func (*MemberAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{40} }
func (m *MemberAddRequest) GetPeerURLs() []string {
if m != nil {
return m.PeerURLs
}
return nil
}
func (m *MemberAddRequest) GetIsLearner() bool {
if m != nil {
return m.IsLearner
}
return false
}
type MemberAddResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// member is the member information for the added member.
Member *Member `protobuf:"bytes,2,opt,name=member" json:"member,omitempty"`
// members is a list of all members after adding the new member.
Members []*Member `protobuf:"bytes,3,rep,name=members" json:"members,omitempty"`
}
func (m *MemberAddResponse) Reset() { *m = MemberAddResponse{} }
func (m *MemberAddResponse) String() string { return proto.CompactTextString(m) }
func (*MemberAddResponse) ProtoMessage() {}
func (*MemberAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{41} }
func (m *MemberAddResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *MemberAddResponse) GetMember() *Member {
if m != nil {
return m.Member
}
return nil
}
func (m *MemberAddResponse) GetMembers() []*Member {
if m != nil {
return m.Members
}
return nil
}
type MemberRemoveRequest struct {
// ID is the member ID of the member to remove.
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (m *MemberRemoveRequest) Reset() { *m = MemberRemoveRequest{} }
func (m *MemberRemoveRequest) String() string { return proto.CompactTextString(m) }
func (*MemberRemoveRequest) ProtoMessage() {}
func (*MemberRemoveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{42} }
func (m *MemberRemoveRequest) GetID() uint64 {
if m != nil {
return m.ID
}
return 0
}
type MemberRemoveResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// members is a list of all members after removing the member.
Members []*Member `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"`
}
func (m *MemberRemoveResponse) Reset() { *m = MemberRemoveResponse{} }
func (m *MemberRemoveResponse) String() string { return proto.CompactTextString(m) }
func (*MemberRemoveResponse) ProtoMessage() {}
func (*MemberRemoveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{43} }
func (m *MemberRemoveResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *MemberRemoveResponse) GetMembers() []*Member {
if m != nil {
return m.Members
}
return nil
}
type MemberUpdateRequest struct {
// ID is the member ID of the member to update.
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
// peerURLs is the new list of URLs the member will use to communicate with the cluster.
PeerURLs []string `protobuf:"bytes,2,rep,name=peerURLs" json:"peerURLs,omitempty"`
}
func (m *MemberUpdateRequest) Reset() { *m = MemberUpdateRequest{} }
func (m *MemberUpdateRequest) String() string { return proto.CompactTextString(m) }
func (*MemberUpdateRequest) ProtoMessage() {}
func (*MemberUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{44} }
func (m *MemberUpdateRequest) GetID() uint64 {
if m != nil {
return m.ID
}
return 0
}
func (m *MemberUpdateRequest) GetPeerURLs() []string {
if m != nil {
return m.PeerURLs
}
return nil
}
type MemberUpdateResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// members is a list of all members after updating the member.
Members []*Member `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"`
}
func (m *MemberUpdateResponse) Reset() { *m = MemberUpdateResponse{} }
func (m *MemberUpdateResponse) String() string { return proto.CompactTextString(m) }
func (*MemberUpdateResponse) ProtoMessage() {}
func (*MemberUpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{45} }
func (m *MemberUpdateResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *MemberUpdateResponse) GetMembers() []*Member {
if m != nil {
return m.Members
}
return nil
}
type MemberListRequest struct {
}
func (m *MemberListRequest) Reset() { *m = MemberListRequest{} }
func (m *MemberListRequest) String() string { return proto.CompactTextString(m) }
func (*MemberListRequest) ProtoMessage() {}
func (*MemberListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{46} }
type MemberListResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// members is a list of all members associated with the cluster.
Members []*Member `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"`
}
func (m *MemberListResponse) Reset() { *m = MemberListResponse{} }
func (m *MemberListResponse) String() string { return proto.CompactTextString(m) }
func (*MemberListResponse) ProtoMessage() {}
func (*MemberListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{47} }
func (m *MemberListResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *MemberListResponse) GetMembers() []*Member {
if m != nil {
return m.Members
}
return nil
}
type MemberPromoteRequest struct {
// ID is the member ID of the member to promote.
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (m *MemberPromoteRequest) Reset() { *m = MemberPromoteRequest{} }
func (m *MemberPromoteRequest) String() string { return proto.CompactTextString(m) }
func (*MemberPromoteRequest) ProtoMessage() {}
func (*MemberPromoteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{48} }
func (m *MemberPromoteRequest) GetID() uint64 {
if m != nil {
return m.ID
}
return 0
}
type MemberPromoteResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// members is a list of all members after promoting the member.
Members []*Member `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"`
}
func (m *MemberPromoteResponse) Reset() { *m = MemberPromoteResponse{} }
func (m *MemberPromoteResponse) String() string { return proto.CompactTextString(m) }
func (*MemberPromoteResponse) ProtoMessage() {}
func (*MemberPromoteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{49} }
func (m *MemberPromoteResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *MemberPromoteResponse) GetMembers() []*Member {
if m != nil {
return m.Members
}
return nil
}
type DefragmentRequest struct {
}
func (m *DefragmentRequest) Reset() { *m = DefragmentRequest{} }
func (m *DefragmentRequest) String() string { return proto.CompactTextString(m) }
func (*DefragmentRequest) ProtoMessage() {}
func (*DefragmentRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{50} }
type DefragmentResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *DefragmentResponse) Reset() { *m = DefragmentResponse{} }
func (m *DefragmentResponse) String() string { return proto.CompactTextString(m) }
func (*DefragmentResponse) ProtoMessage() {}
func (*DefragmentResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{51} }
func (m *DefragmentResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type MoveLeaderRequest struct {
// targetID is the node ID for the new leader.
TargetID uint64 `protobuf:"varint,1,opt,name=targetID,proto3" json:"targetID,omitempty"`
}
func (m *MoveLeaderRequest) Reset() { *m = MoveLeaderRequest{} }
func (m *MoveLeaderRequest) String() string { return proto.CompactTextString(m) }
func (*MoveLeaderRequest) ProtoMessage() {}
func (*MoveLeaderRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{52} }
func (m *MoveLeaderRequest) GetTargetID() uint64 {
if m != nil {
return m.TargetID
}
return 0
}
type MoveLeaderResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *MoveLeaderResponse) Reset() { *m = MoveLeaderResponse{} }
func (m *MoveLeaderResponse) String() string { return proto.CompactTextString(m) }
func (*MoveLeaderResponse) ProtoMessage() {}
func (*MoveLeaderResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{53} }
func (m *MoveLeaderResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AlarmRequest struct {
// action is the kind of alarm request to issue. The action
// may GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a
// raised alarm.
Action AlarmRequest_AlarmAction `protobuf:"varint,1,opt,name=action,proto3,enum=etcdserverpb.AlarmRequest_AlarmAction" json:"action,omitempty"`
// memberID is the ID of the member associated with the alarm. If memberID is 0, the
// alarm request covers all members.
MemberID uint64 `protobuf:"varint,2,opt,name=memberID,proto3" json:"memberID,omitempty"`
// alarm is the type of alarm to consider for this request.
Alarm AlarmType `protobuf:"varint,3,opt,name=alarm,proto3,enum=etcdserverpb.AlarmType" json:"alarm,omitempty"`
}
func (m *AlarmRequest) Reset() { *m = AlarmRequest{} }
func (m *AlarmRequest) String() string { return proto.CompactTextString(m) }
func (*AlarmRequest) ProtoMessage() {}
func (*AlarmRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{54} }
func (m *AlarmRequest) GetAction() AlarmRequest_AlarmAction {
if m != nil {
return m.Action
}
return AlarmRequest_GET
}
func (m *AlarmRequest) GetMemberID() uint64 {
if m != nil {
return m.MemberID
}
return 0
}
func (m *AlarmRequest) GetAlarm() AlarmType {
if m != nil {
return m.Alarm
}
return AlarmType_NONE
}
type AlarmMember struct {
// memberID is the ID of the member associated with the raised alarm.
MemberID uint64 `protobuf:"varint,1,opt,name=memberID,proto3" json:"memberID,omitempty"`
// alarm is the type of alarm which has been raised.
Alarm AlarmType `protobuf:"varint,2,opt,name=alarm,proto3,enum=etcdserverpb.AlarmType" json:"alarm,omitempty"`
}
func (m *AlarmMember) Reset() { *m = AlarmMember{} }
func (m *AlarmMember) String() string { return proto.CompactTextString(m) }
func (*AlarmMember) ProtoMessage() {}
func (*AlarmMember) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{55} }
func (m *AlarmMember) GetMemberID() uint64 {
if m != nil {
return m.MemberID
}
return 0
}
func (m *AlarmMember) GetAlarm() AlarmType {
if m != nil {
return m.Alarm
}
return AlarmType_NONE
}
type AlarmResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// alarms is a list of alarms associated with the alarm request.
Alarms []*AlarmMember `protobuf:"bytes,2,rep,name=alarms" json:"alarms,omitempty"`
}
func (m *AlarmResponse) Reset() { *m = AlarmResponse{} }
func (m *AlarmResponse) String() string { return proto.CompactTextString(m) }
func (*AlarmResponse) ProtoMessage() {}
func (*AlarmResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{56} }
func (m *AlarmResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *AlarmResponse) GetAlarms() []*AlarmMember {
if m != nil {
return m.Alarms
}
return nil
}
type StatusRequest struct {
}
func (m *StatusRequest) Reset() { *m = StatusRequest{} }
func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
func (*StatusRequest) ProtoMessage() {}
func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{57} }
type StatusResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// version is the cluster protocol version used by the responding member.
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// dbSize is the size of the backend database physically allocated, in bytes, of the responding member.
DbSize int64 `protobuf:"varint,3,opt,name=dbSize,proto3" json:"dbSize,omitempty"`
// leader is the member ID which the responding member believes is the current leader.
Leader uint64 `protobuf:"varint,4,opt,name=leader,proto3" json:"leader,omitempty"`
// raftIndex is the current raft committed index of the responding member.
RaftIndex uint64 `protobuf:"varint,5,opt,name=raftIndex,proto3" json:"raftIndex,omitempty"`
// raftTerm is the current raft term of the responding member.
RaftTerm uint64 `protobuf:"varint,6,opt,name=raftTerm,proto3" json:"raftTerm,omitempty"`
// raftAppliedIndex is the current raft applied index of the responding member.
RaftAppliedIndex uint64 `protobuf:"varint,7,opt,name=raftAppliedIndex,proto3" json:"raftAppliedIndex,omitempty"`
// errors contains alarm/health information and status.
Errors []string `protobuf:"bytes,8,rep,name=errors" json:"errors,omitempty"`
// dbSizeInUse is the size of the backend database logically in use, in bytes, of the responding member.
DbSizeInUse int64 `protobuf:"varint,9,opt,name=dbSizeInUse,proto3" json:"dbSizeInUse,omitempty"`
// isLearner indicates if the member is raft learner.
IsLearner bool `protobuf:"varint,10,opt,name=isLearner,proto3" json:"isLearner,omitempty"`
}
func (m *StatusResponse) Reset() { *m = StatusResponse{} }
func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
func (*StatusResponse) ProtoMessage() {}
func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{58} }
func (m *StatusResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *StatusResponse) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *StatusResponse) GetDbSize() int64 {
if m != nil {
return m.DbSize
}
return 0
}
func (m *StatusResponse) GetLeader() uint64 {
if m != nil {
return m.Leader
}
return 0
}
func (m *StatusResponse) GetRaftIndex() uint64 {
if m != nil {
return m.RaftIndex
}
return 0
}
func (m *StatusResponse) GetRaftTerm() uint64 {
if m != nil {
return m.RaftTerm
}
return 0
}
func (m *StatusResponse) GetRaftAppliedIndex() uint64 {
if m != nil {
return m.RaftAppliedIndex
}
return 0
}
func (m *StatusResponse) GetErrors() []string {
if m != nil {
return m.Errors
}
return nil
}
func (m *StatusResponse) GetDbSizeInUse() int64 {
if m != nil {
return m.DbSizeInUse
}
return 0
}
func (m *StatusResponse) GetIsLearner() bool {
if m != nil {
return m.IsLearner
}
return false
}
type AuthEnableRequest struct {
}
func (m *AuthEnableRequest) Reset() { *m = AuthEnableRequest{} }
func (m *AuthEnableRequest) String() string { return proto.CompactTextString(m) }
func (*AuthEnableRequest) ProtoMessage() {}
func (*AuthEnableRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{59} }
type AuthDisableRequest struct {
}
func (m *AuthDisableRequest) Reset() { *m = AuthDisableRequest{} }
func (m *AuthDisableRequest) String() string { return proto.CompactTextString(m) }
func (*AuthDisableRequest) ProtoMessage() {}
func (*AuthDisableRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{60} }
type AuthenticateRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
}
func (m *AuthenticateRequest) Reset() { *m = AuthenticateRequest{} }
func (m *AuthenticateRequest) String() string { return proto.CompactTextString(m) }
func (*AuthenticateRequest) ProtoMessage() {}
func (*AuthenticateRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{61} }
func (m *AuthenticateRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *AuthenticateRequest) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
type AuthUserAddRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
Options *authpb.UserAddOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
}
func (m *AuthUserAddRequest) Reset() { *m = AuthUserAddRequest{} }
func (m *AuthUserAddRequest) String() string { return proto.CompactTextString(m) }
func (*AuthUserAddRequest) ProtoMessage() {}
func (*AuthUserAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{62} }
func (m *AuthUserAddRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *AuthUserAddRequest) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
func (m *AuthUserAddRequest) GetOptions() *authpb.UserAddOptions {
if m != nil {
return m.Options
}
return nil
}
type AuthUserGetRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (m *AuthUserGetRequest) Reset() { *m = AuthUserGetRequest{} }
func (m *AuthUserGetRequest) String() string { return proto.CompactTextString(m) }
func (*AuthUserGetRequest) ProtoMessage() {}
func (*AuthUserGetRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{63} }
func (m *AuthUserGetRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type AuthUserDeleteRequest struct {
// name is the name of the user to delete.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (m *AuthUserDeleteRequest) Reset() { *m = AuthUserDeleteRequest{} }
func (m *AuthUserDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*AuthUserDeleteRequest) ProtoMessage() {}
func (*AuthUserDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{64} }
func (m *AuthUserDeleteRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type AuthUserChangePasswordRequest struct {
// name is the name of the user whose password is being changed.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// password is the new password for the user.
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
}
func (m *AuthUserChangePasswordRequest) Reset() { *m = AuthUserChangePasswordRequest{} }
func (m *AuthUserChangePasswordRequest) String() string { return proto.CompactTextString(m) }
func (*AuthUserChangePasswordRequest) ProtoMessage() {}
func (*AuthUserChangePasswordRequest) Descriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{65}
}
func (m *AuthUserChangePasswordRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *AuthUserChangePasswordRequest) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
type AuthUserGrantRoleRequest struct {
// user is the name of the user which should be granted a given role.
User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// role is the name of the role to grant to the user.
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
}
func (m *AuthUserGrantRoleRequest) Reset() { *m = AuthUserGrantRoleRequest{} }
func (m *AuthUserGrantRoleRequest) String() string { return proto.CompactTextString(m) }
func (*AuthUserGrantRoleRequest) ProtoMessage() {}
func (*AuthUserGrantRoleRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{66} }
func (m *AuthUserGrantRoleRequest) GetUser() string {
if m != nil {
return m.User
}
return ""
}
func (m *AuthUserGrantRoleRequest) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
type AuthUserRevokeRoleRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
}
func (m *AuthUserRevokeRoleRequest) Reset() { *m = AuthUserRevokeRoleRequest{} }
func (m *AuthUserRevokeRoleRequest) String() string { return proto.CompactTextString(m) }
func (*AuthUserRevokeRoleRequest) ProtoMessage() {}
func (*AuthUserRevokeRoleRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{67} }
func (m *AuthUserRevokeRoleRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *AuthUserRevokeRoleRequest) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
type AuthRoleAddRequest struct {
// name is the name of the role to add to the authentication system.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (m *AuthRoleAddRequest) Reset() { *m = AuthRoleAddRequest{} }
func (m *AuthRoleAddRequest) String() string { return proto.CompactTextString(m) }
func (*AuthRoleAddRequest) ProtoMessage() {}
func (*AuthRoleAddRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{68} }
func (m *AuthRoleAddRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type AuthRoleGetRequest struct {
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
}
func (m *AuthRoleGetRequest) Reset() { *m = AuthRoleGetRequest{} }
func (m *AuthRoleGetRequest) String() string { return proto.CompactTextString(m) }
func (*AuthRoleGetRequest) ProtoMessage() {}
func (*AuthRoleGetRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{69} }
func (m *AuthRoleGetRequest) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
type AuthUserListRequest struct {
}
func (m *AuthUserListRequest) Reset() { *m = AuthUserListRequest{} }
func (m *AuthUserListRequest) String() string { return proto.CompactTextString(m) }
func (*AuthUserListRequest) ProtoMessage() {}
func (*AuthUserListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{70} }
type AuthRoleListRequest struct {
}
func (m *AuthRoleListRequest) Reset() { *m = AuthRoleListRequest{} }
func (m *AuthRoleListRequest) String() string { return proto.CompactTextString(m) }
func (*AuthRoleListRequest) ProtoMessage() {}
func (*AuthRoleListRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{71} }
type AuthRoleDeleteRequest struct {
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
}
func (m *AuthRoleDeleteRequest) Reset() { *m = AuthRoleDeleteRequest{} }
func (m *AuthRoleDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*AuthRoleDeleteRequest) ProtoMessage() {}
func (*AuthRoleDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{72} }
func (m *AuthRoleDeleteRequest) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
type AuthRoleGrantPermissionRequest struct {
// name is the name of the role which will be granted the permission.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// perm is the permission to grant to the role.
Perm *authpb.Permission `protobuf:"bytes,2,opt,name=perm" json:"perm,omitempty"`
}
func (m *AuthRoleGrantPermissionRequest) Reset() { *m = AuthRoleGrantPermissionRequest{} }
func (m *AuthRoleGrantPermissionRequest) String() string { return proto.CompactTextString(m) }
func (*AuthRoleGrantPermissionRequest) ProtoMessage() {}
func (*AuthRoleGrantPermissionRequest) Descriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{73}
}
func (m *AuthRoleGrantPermissionRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *AuthRoleGrantPermissionRequest) GetPerm() *authpb.Permission {
if m != nil {
return m.Perm
}
return nil
}
type AuthRoleRevokePermissionRequest struct {
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
}
func (m *AuthRoleRevokePermissionRequest) Reset() { *m = AuthRoleRevokePermissionRequest{} }
func (m *AuthRoleRevokePermissionRequest) String() string { return proto.CompactTextString(m) }
func (*AuthRoleRevokePermissionRequest) ProtoMessage() {}
func (*AuthRoleRevokePermissionRequest) Descriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{74}
}
func (m *AuthRoleRevokePermissionRequest) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
func (m *AuthRoleRevokePermissionRequest) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *AuthRoleRevokePermissionRequest) GetRangeEnd() []byte {
if m != nil {
return m.RangeEnd
}
return nil
}
type AuthEnableResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthEnableResponse) Reset() { *m = AuthEnableResponse{} }
func (m *AuthEnableResponse) String() string { return proto.CompactTextString(m) }
func (*AuthEnableResponse) ProtoMessage() {}
func (*AuthEnableResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{75} }
func (m *AuthEnableResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthDisableResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthDisableResponse) Reset() { *m = AuthDisableResponse{} }
func (m *AuthDisableResponse) String() string { return proto.CompactTextString(m) }
func (*AuthDisableResponse) ProtoMessage() {}
func (*AuthDisableResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{76} }
func (m *AuthDisableResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthenticateResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// token is an authorized token that can be used in succeeding RPCs
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
}
func (m *AuthenticateResponse) Reset() { *m = AuthenticateResponse{} }
func (m *AuthenticateResponse) String() string { return proto.CompactTextString(m) }
func (*AuthenticateResponse) ProtoMessage() {}
func (*AuthenticateResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{77} }
func (m *AuthenticateResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *AuthenticateResponse) GetToken() string {
if m != nil {
return m.Token
}
return ""
}
type AuthUserAddResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthUserAddResponse) Reset() { *m = AuthUserAddResponse{} }
func (m *AuthUserAddResponse) String() string { return proto.CompactTextString(m) }
func (*AuthUserAddResponse) ProtoMessage() {}
func (*AuthUserAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{78} }
func (m *AuthUserAddResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthUserGetResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
Roles []string `protobuf:"bytes,2,rep,name=roles" json:"roles,omitempty"`
}
func (m *AuthUserGetResponse) Reset() { *m = AuthUserGetResponse{} }
func (m *AuthUserGetResponse) String() string { return proto.CompactTextString(m) }
func (*AuthUserGetResponse) ProtoMessage() {}
func (*AuthUserGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{79} }
func (m *AuthUserGetResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *AuthUserGetResponse) GetRoles() []string {
if m != nil {
return m.Roles
}
return nil
}
type AuthUserDeleteResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthUserDeleteResponse) Reset() { *m = AuthUserDeleteResponse{} }
func (m *AuthUserDeleteResponse) String() string { return proto.CompactTextString(m) }
func (*AuthUserDeleteResponse) ProtoMessage() {}
func (*AuthUserDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{80} }
func (m *AuthUserDeleteResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthUserChangePasswordResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthUserChangePasswordResponse) Reset() { *m = AuthUserChangePasswordResponse{} }
func (m *AuthUserChangePasswordResponse) String() string { return proto.CompactTextString(m) }
func (*AuthUserChangePasswordResponse) ProtoMessage() {}
func (*AuthUserChangePasswordResponse) Descriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{81}
}
func (m *AuthUserChangePasswordResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthUserGrantRoleResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthUserGrantRoleResponse) Reset() { *m = AuthUserGrantRoleResponse{} }
func (m *AuthUserGrantRoleResponse) String() string { return proto.CompactTextString(m) }
func (*AuthUserGrantRoleResponse) ProtoMessage() {}
func (*AuthUserGrantRoleResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{82} }
func (m *AuthUserGrantRoleResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthUserRevokeRoleResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthUserRevokeRoleResponse) Reset() { *m = AuthUserRevokeRoleResponse{} }
func (m *AuthUserRevokeRoleResponse) String() string { return proto.CompactTextString(m) }
func (*AuthUserRevokeRoleResponse) ProtoMessage() {}
func (*AuthUserRevokeRoleResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{83} }
func (m *AuthUserRevokeRoleResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthRoleAddResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthRoleAddResponse) Reset() { *m = AuthRoleAddResponse{} }
func (m *AuthRoleAddResponse) String() string { return proto.CompactTextString(m) }
func (*AuthRoleAddResponse) ProtoMessage() {}
func (*AuthRoleAddResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{84} }
func (m *AuthRoleAddResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthRoleGetResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
Perm []*authpb.Permission `protobuf:"bytes,2,rep,name=perm" json:"perm,omitempty"`
}
func (m *AuthRoleGetResponse) Reset() { *m = AuthRoleGetResponse{} }
func (m *AuthRoleGetResponse) String() string { return proto.CompactTextString(m) }
func (*AuthRoleGetResponse) ProtoMessage() {}
func (*AuthRoleGetResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{85} }
func (m *AuthRoleGetResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *AuthRoleGetResponse) GetPerm() []*authpb.Permission {
if m != nil {
return m.Perm
}
return nil
}
type AuthRoleListResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
Roles []string `protobuf:"bytes,2,rep,name=roles" json:"roles,omitempty"`
}
func (m *AuthRoleListResponse) Reset() { *m = AuthRoleListResponse{} }
func (m *AuthRoleListResponse) String() string { return proto.CompactTextString(m) }
func (*AuthRoleListResponse) ProtoMessage() {}
func (*AuthRoleListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{86} }
func (m *AuthRoleListResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *AuthRoleListResponse) GetRoles() []string {
if m != nil {
return m.Roles
}
return nil
}
type AuthUserListResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
Users []string `protobuf:"bytes,2,rep,name=users" json:"users,omitempty"`
}
func (m *AuthUserListResponse) Reset() { *m = AuthUserListResponse{} }
func (m *AuthUserListResponse) String() string { return proto.CompactTextString(m) }
func (*AuthUserListResponse) ProtoMessage() {}
func (*AuthUserListResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{87} }
func (m *AuthUserListResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *AuthUserListResponse) GetUsers() []string {
if m != nil {
return m.Users
}
return nil
}
type AuthRoleDeleteResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthRoleDeleteResponse) Reset() { *m = AuthRoleDeleteResponse{} }
func (m *AuthRoleDeleteResponse) String() string { return proto.CompactTextString(m) }
func (*AuthRoleDeleteResponse) ProtoMessage() {}
func (*AuthRoleDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{88} }
func (m *AuthRoleDeleteResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthRoleGrantPermissionResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthRoleGrantPermissionResponse) Reset() { *m = AuthRoleGrantPermissionResponse{} }
func (m *AuthRoleGrantPermissionResponse) String() string { return proto.CompactTextString(m) }
func (*AuthRoleGrantPermissionResponse) ProtoMessage() {}
func (*AuthRoleGrantPermissionResponse) Descriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{89}
}
func (m *AuthRoleGrantPermissionResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
type AuthRoleRevokePermissionResponse struct {
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}
func (m *AuthRoleRevokePermissionResponse) Reset() { *m = AuthRoleRevokePermissionResponse{} }
func (m *AuthRoleRevokePermissionResponse) String() string { return proto.CompactTextString(m) }
func (*AuthRoleRevokePermissionResponse) ProtoMessage() {}
func (*AuthRoleRevokePermissionResponse) Descriptor() ([]byte, []int) {
return fileDescriptorRpc, []int{90}
}
func (m *AuthRoleRevokePermissionResponse) GetHeader() *ResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func init() {
proto.RegisterType((*ResponseHeader)(nil), "etcdserverpb.ResponseHeader")
proto.RegisterType((*RangeRequest)(nil), "etcdserverpb.RangeRequest")
proto.RegisterType((*RangeResponse)(nil), "etcdserverpb.RangeResponse")
proto.RegisterType((*PutRequest)(nil), "etcdserverpb.PutRequest")
proto.RegisterType((*PutResponse)(nil), "etcdserverpb.PutResponse")
proto.RegisterType((*DeleteRangeRequest)(nil), "etcdserverpb.DeleteRangeRequest")
proto.RegisterType((*DeleteRangeResponse)(nil), "etcdserverpb.DeleteRangeResponse")
proto.RegisterType((*RequestOp)(nil), "etcdserverpb.RequestOp")
proto.RegisterType((*ResponseOp)(nil), "etcdserverpb.ResponseOp")
proto.RegisterType((*Compare)(nil), "etcdserverpb.Compare")
proto.RegisterType((*TxnRequest)(nil), "etcdserverpb.TxnRequest")
proto.RegisterType((*TxnResponse)(nil), "etcdserverpb.TxnResponse")
proto.RegisterType((*CompactionRequest)(nil), "etcdserverpb.CompactionRequest")
proto.RegisterType((*CompactionResponse)(nil), "etcdserverpb.CompactionResponse")
proto.RegisterType((*HashRequest)(nil), "etcdserverpb.HashRequest")
proto.RegisterType((*HashKVRequest)(nil), "etcdserverpb.HashKVRequest")
proto.RegisterType((*HashKVResponse)(nil), "etcdserverpb.HashKVResponse")
proto.RegisterType((*HashResponse)(nil), "etcdserverpb.HashResponse")
proto.RegisterType((*SnapshotRequest)(nil), "etcdserverpb.SnapshotRequest")
proto.RegisterType((*SnapshotResponse)(nil), "etcdserverpb.SnapshotResponse")
proto.RegisterType((*WatchRequest)(nil), "etcdserverpb.WatchRequest")
proto.RegisterType((*WatchCreateRequest)(nil), "etcdserverpb.WatchCreateRequest")
proto.RegisterType((*WatchCancelRequest)(nil), "etcdserverpb.WatchCancelRequest")
proto.RegisterType((*WatchProgressRequest)(nil), "etcdserverpb.WatchProgressRequest")
proto.RegisterType((*WatchResponse)(nil), "etcdserverpb.WatchResponse")
proto.RegisterType((*LeaseGrantRequest)(nil), "etcdserverpb.LeaseGrantRequest")
proto.RegisterType((*LeaseGrantResponse)(nil), "etcdserverpb.LeaseGrantResponse")
proto.RegisterType((*LeaseRevokeRequest)(nil), "etcdserverpb.LeaseRevokeRequest")
proto.RegisterType((*LeaseRevokeResponse)(nil), "etcdserverpb.LeaseRevokeResponse")
proto.RegisterType((*LeaseCheckpoint)(nil), "etcdserverpb.LeaseCheckpoint")
proto.RegisterType((*LeaseCheckpointRequest)(nil), "etcdserverpb.LeaseCheckpointRequest")
proto.RegisterType((*LeaseCheckpointResponse)(nil), "etcdserverpb.LeaseCheckpointResponse")
proto.RegisterType((*LeaseKeepAliveRequest)(nil), "etcdserverpb.LeaseKeepAliveRequest")
proto.RegisterType((*LeaseKeepAliveResponse)(nil), "etcdserverpb.LeaseKeepAliveResponse")
proto.RegisterType((*LeaseTimeToLiveRequest)(nil), "etcdserverpb.LeaseTimeToLiveRequest")
proto.RegisterType((*LeaseTimeToLiveResponse)(nil), "etcdserverpb.LeaseTimeToLiveResponse")
proto.RegisterType((*LeaseLeasesRequest)(nil), "etcdserverpb.LeaseLeasesRequest")
proto.RegisterType((*LeaseStatus)(nil), "etcdserverpb.LeaseStatus")
proto.RegisterType((*LeaseLeasesResponse)(nil), "etcdserverpb.LeaseLeasesResponse")
proto.RegisterType((*Member)(nil), "etcdserverpb.Member")
proto.RegisterType((*MemberAddRequest)(nil), "etcdserverpb.MemberAddRequest")
proto.RegisterType((*MemberAddResponse)(nil), "etcdserverpb.MemberAddResponse")
proto.RegisterType((*MemberRemoveRequest)(nil), "etcdserverpb.MemberRemoveRequest")
proto.RegisterType((*MemberRemoveResponse)(nil), "etcdserverpb.MemberRemoveResponse")
proto.RegisterType((*MemberUpdateRequest)(nil), "etcdserverpb.MemberUpdateRequest")
proto.RegisterType((*MemberUpdateResponse)(nil), "etcdserverpb.MemberUpdateResponse")
proto.RegisterType((*MemberListRequest)(nil), "etcdserverpb.MemberListRequest")
proto.RegisterType((*MemberListResponse)(nil), "etcdserverpb.MemberListResponse")
proto.RegisterType((*MemberPromoteRequest)(nil), "etcdserverpb.MemberPromoteRequest")
proto.RegisterType((*MemberPromoteResponse)(nil), "etcdserverpb.MemberPromoteResponse")
proto.RegisterType((*DefragmentRequest)(nil), "etcdserverpb.DefragmentRequest")
proto.RegisterType((*DefragmentResponse)(nil), "etcdserverpb.DefragmentResponse")
proto.RegisterType((*MoveLeaderRequest)(nil), "etcdserverpb.MoveLeaderRequest")
proto.RegisterType((*MoveLeaderResponse)(nil), "etcdserverpb.MoveLeaderResponse")
proto.RegisterType((*AlarmRequest)(nil), "etcdserverpb.AlarmRequest")
proto.RegisterType((*AlarmMember)(nil), "etcdserverpb.AlarmMember")
proto.RegisterType((*AlarmResponse)(nil), "etcdserverpb.AlarmResponse")
proto.RegisterType((*StatusRequest)(nil), "etcdserverpb.StatusRequest")
proto.RegisterType((*StatusResponse)(nil), "etcdserverpb.StatusResponse")
proto.RegisterType((*AuthEnableRequest)(nil), "etcdserverpb.AuthEnableRequest")
proto.RegisterType((*AuthDisableRequest)(nil), "etcdserverpb.AuthDisableRequest")
proto.RegisterType((*AuthenticateRequest)(nil), "etcdserverpb.AuthenticateRequest")
proto.RegisterType((*AuthUserAddRequest)(nil), "etcdserverpb.AuthUserAddRequest")
proto.RegisterType((*AuthUserGetRequest)(nil), "etcdserverpb.AuthUserGetRequest")
proto.RegisterType((*AuthUserDeleteRequest)(nil), "etcdserverpb.AuthUserDeleteRequest")
proto.RegisterType((*AuthUserChangePasswordRequest)(nil), "etcdserverpb.AuthUserChangePasswordRequest")
proto.RegisterType((*AuthUserGrantRoleRequest)(nil), "etcdserverpb.AuthUserGrantRoleRequest")
proto.RegisterType((*AuthUserRevokeRoleRequest)(nil), "etcdserverpb.AuthUserRevokeRoleRequest")
proto.RegisterType((*AuthRoleAddRequest)(nil), "etcdserverpb.AuthRoleAddRequest")
proto.RegisterType((*AuthRoleGetRequest)(nil), "etcdserverpb.AuthRoleGetRequest")
proto.RegisterType((*AuthUserListRequest)(nil), "etcdserverpb.AuthUserListRequest")
proto.RegisterType((*AuthRoleListRequest)(nil), "etcdserverpb.AuthRoleListRequest")
proto.RegisterType((*AuthRoleDeleteRequest)(nil), "etcdserverpb.AuthRoleDeleteRequest")
proto.RegisterType((*AuthRoleGrantPermissionRequest)(nil), "etcdserverpb.AuthRoleGrantPermissionRequest")
proto.RegisterType((*AuthRoleRevokePermissionRequest)(nil), "etcdserverpb.AuthRoleRevokePermissionRequest")
proto.RegisterType((*AuthEnableResponse)(nil), "etcdserverpb.AuthEnableResponse")
proto.RegisterType((*AuthDisableResponse)(nil), "etcdserverpb.AuthDisableResponse")
proto.RegisterType((*AuthenticateResponse)(nil), "etcdserverpb.AuthenticateResponse")
proto.RegisterType((*AuthUserAddResponse)(nil), "etcdserverpb.AuthUserAddResponse")
proto.RegisterType((*AuthUserGetResponse)(nil), "etcdserverpb.AuthUserGetResponse")
proto.RegisterType((*AuthUserDeleteResponse)(nil), "etcdserverpb.AuthUserDeleteResponse")
proto.RegisterType((*AuthUserChangePasswordResponse)(nil), "etcdserverpb.AuthUserChangePasswordResponse")
proto.RegisterType((*AuthUserGrantRoleResponse)(nil), "etcdserverpb.AuthUserGrantRoleResponse")
proto.RegisterType((*AuthUserRevokeRoleResponse)(nil), "etcdserverpb.AuthUserRevokeRoleResponse")
proto.RegisterType((*AuthRoleAddResponse)(nil), "etcdserverpb.AuthRoleAddResponse")
proto.RegisterType((*AuthRoleGetResponse)(nil), "etcdserverpb.AuthRoleGetResponse")
proto.RegisterType((*AuthRoleListResponse)(nil), "etcdserverpb.AuthRoleListResponse")
proto.RegisterType((*AuthUserListResponse)(nil), "etcdserverpb.AuthUserListResponse")
proto.RegisterType((*AuthRoleDeleteResponse)(nil), "etcdserverpb.AuthRoleDeleteResponse")
proto.RegisterType((*AuthRoleGrantPermissionResponse)(nil), "etcdserverpb.AuthRoleGrantPermissionResponse")
proto.RegisterType((*AuthRoleRevokePermissionResponse)(nil), "etcdserverpb.AuthRoleRevokePermissionResponse")
proto.RegisterEnum("etcdserverpb.AlarmType", AlarmType_name, AlarmType_value)
proto.RegisterEnum("etcdserverpb.RangeRequest_SortOrder", RangeRequest_SortOrder_name, RangeRequest_SortOrder_value)
proto.RegisterEnum("etcdserverpb.RangeRequest_SortTarget", RangeRequest_SortTarget_name, RangeRequest_SortTarget_value)
proto.RegisterEnum("etcdserverpb.Compare_CompareResult", Compare_CompareResult_name, Compare_CompareResult_value)
proto.RegisterEnum("etcdserverpb.Compare_CompareTarget", Compare_CompareTarget_name, Compare_CompareTarget_value)
proto.RegisterEnum("etcdserverpb.WatchCreateRequest_FilterType", WatchCreateRequest_FilterType_name, WatchCreateRequest_FilterType_value)
proto.RegisterEnum("etcdserverpb.AlarmRequest_AlarmAction", AlarmRequest_AlarmAction_name, AlarmRequest_AlarmAction_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for KV service
type KVClient interface {
// Range gets the keys in the range from the key-value store.
Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error)
// Put puts the given key into the key-value store.
// A put request increments the revision of the key-value store
// and generates one event in the event history.
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
// DeleteRange deletes the given range from the key-value store.
// A delete request increments the revision of the key-value store
// and generates a delete event in the event history for every deleted key.
DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error)
// Txn processes multiple requests in a single transaction.
// A txn request increments the revision of the key-value store
// and generates events with the same revision for every completed request.
// It is not allowed to modify the same key several times within one txn.
Txn(ctx context.Context, in *TxnRequest, opts ...grpc.CallOption) (*TxnResponse, error)
// Compact compacts the event history in the etcd key-value store. The key-value
// store should be periodically compacted or the event history will continue to grow
// indefinitely.
Compact(ctx context.Context, in *CompactionRequest, opts ...grpc.CallOption) (*CompactionResponse, error)
}
type kVClient struct {
cc *grpc.ClientConn
}
func NewKVClient(cc *grpc.ClientConn) KVClient {
return &kVClient{cc}
}
func (c *kVClient) Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) {
out := new(RangeResponse)
err := grpc.Invoke(ctx, "/etcdserverpb.KV/Range", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kVClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
out := new(PutResponse)
err := grpc.Invoke(ctx, "/etcdserverpb.KV/Put", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kVClient) DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error) {
out := new(DeleteRangeResponse)
err := grpc.Invoke(ctx, "/etcdserverpb.KV/DeleteRange", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kVClient) Txn(ctx context.Context, in *TxnRequest, opts ...grpc.CallOption) (*TxnResponse, error) {
out := new(TxnResponse)
err := grpc.Invoke(ctx, "/etcdserverpb.KV/Txn", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kVClient) Compact(ctx context.Context, in *CompactionRequest, opts ...grpc.CallOption) (*CompactionResponse, error) {
out := new(CompactionResponse)
err := grpc.Invoke(ctx, "/etcdserverpb.KV/Compact", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for KV service
type KVServer interface {
// Range gets the keys in the range from the key-value store.
Range(context.Context, *RangeRequest) (*RangeResponse, error)
// Put puts the given key into the key-value store.
// A put request increments the revision of the key-value store
// and generates one event in the event history.
Put(context.Context, *PutRequest) (*PutResponse, error)
// DeleteRange deletes the given range from the key-value store.
// A delete request increments the revision of the key-value store
// and generates a delete event in the event history for every deleted key.
DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error)
// Txn processes multiple requests in a single transaction.
// A txn request increments the revision of the key-value store
// and generates events with the same revision for every completed request.
// It is not allowed to modify the same key several times within one txn.
Txn(context.Context, *TxnRequest) (*TxnResponse, error)
// Compact compacts the event history in the etcd key-value store. The key-value
// store should be periodically compacted or the event history will continue to grow
// indefinitely.
Compact(context.Context, *CompactionRequest) (*CompactionResponse, error)
}
func RegisterKVServer(s *grpc.Server, srv KVServer) {
s.RegisterService(&_KV_serviceDesc, srv)
}
func _KV_Range_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RangeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KVServer).Range(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/etcdserverpb.KV/Range",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KVServer).Range(ctx, req.(*RangeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KV_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PutRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KVServer).Put(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/etcdserverpb.KV/Put",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KVServer).Put(ctx, req.(*PutRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KV_DeleteRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRangeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KVServer).DeleteRange(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/etcdserverpb.KV/DeleteRange",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KVServer).DeleteRange(ctx, req.(*DeleteRangeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KV_Txn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TxnRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KVServer).Txn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/etcdserverpb.KV/Txn",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KVServer).Txn(ctx, req.(*TxnRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KV_Compact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CompactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KVServer).Compact(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/etcdserverpb.KV/Compact",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KVServer).Compact(ctx, req.(*CompactionRequest))
}
return interceptor(ctx, in, info, handler)
}
var _KV_serviceDesc = grpc.ServiceDesc{
ServiceName: "etcdserverpb.KV",
HandlerType: (*KVServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Range",
Handler: _KV_Range_Handler,
},
{
MethodName: "Put",
Handler: _KV_Put_Handler,
},
{
MethodName: "DeleteRange",
Handler: _KV_DeleteRange_Handler,
},
{
MethodName: "Txn",
Handler: _KV_Txn_Handler,
},
{
MethodName: "Compact",
Handler: _KV_Compact_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "rpc.proto",
}
// Client API for Watch service
type WatchClient interface {
// Watch watches for events happening or that have happened. Both input and output
// are streams; the input stream is for creating and canceling watchers and the output
// stream sends events. One watch RPC can watch on multiple key ranges, streaming events
// for several watches at once. The entire event history can be watched starting from the
// last compaction revision.
Watch(ctx context.Context, opts ...grpc.CallOption) (Watch_WatchClient, error)
}
type watchClient struct {
cc *grpc.ClientConn
}
func NewWatchClient(cc *grpc.ClientConn) WatchClient {
return &watchClient{cc}
}
func (c *watchClient) Watch(ctx context.Context, opts ...grpc.CallOption) (Watch_WatchClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Watch_serviceDesc.Streams[0], c.cc, "/etcdserverpb.Watch/Watch", opts...)
if err != nil {
return nil, err