|
@@ -441,7 +441,7 @@ func (m *WatchResponse) GetEvents() []*storagepb.Event {
|
|
|
|
|
|
|
|
type LeaseCreateRequest struct {
|
|
type LeaseCreateRequest struct {
|
|
|
// advisory ttl in seconds
|
|
// advisory ttl in seconds
|
|
|
- Ttl int64 `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
|
|
|
|
|
|
+ TTL int64 `protobuf:"varint,1,opt,proto3" json:"TTL,omitempty"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (m *LeaseCreateRequest) Reset() { *m = LeaseCreateRequest{} }
|
|
func (m *LeaseCreateRequest) Reset() { *m = LeaseCreateRequest{} }
|
|
@@ -449,10 +449,10 @@ func (m *LeaseCreateRequest) String() string { return proto.CompactTextString(m)
|
|
|
func (*LeaseCreateRequest) ProtoMessage() {}
|
|
func (*LeaseCreateRequest) ProtoMessage() {}
|
|
|
|
|
|
|
|
type LeaseCreateResponse struct {
|
|
type LeaseCreateResponse struct {
|
|
|
- Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
|
|
|
|
- LeaseId int64 `protobuf:"varint,2,opt,name=lease_id,proto3" json:"lease_id,omitempty"`
|
|
|
|
|
|
|
+ Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
|
|
|
|
+ ID int64 `protobuf:"varint,2,opt,proto3" json:"ID,omitempty"`
|
|
|
// server decided ttl in second
|
|
// server decided ttl in second
|
|
|
- Ttl int64 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
|
|
|
|
|
|
+ TTL int64 `protobuf:"varint,3,opt,proto3" json:"TTL,omitempty"`
|
|
|
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
|
|
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -468,7 +468,7 @@ func (m *LeaseCreateResponse) GetHeader() *ResponseHeader {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type LeaseRevokeRequest struct {
|
|
type LeaseRevokeRequest struct {
|
|
|
- LeaseId int64 `protobuf:"varint,1,opt,name=lease_id,proto3" json:"lease_id,omitempty"`
|
|
|
|
|
|
|
+ ID int64 `protobuf:"varint,1,opt,proto3" json:"ID,omitempty"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (m *LeaseRevokeRequest) Reset() { *m = LeaseRevokeRequest{} }
|
|
func (m *LeaseRevokeRequest) Reset() { *m = LeaseRevokeRequest{} }
|
|
@@ -491,7 +491,7 @@ func (m *LeaseRevokeResponse) GetHeader() *ResponseHeader {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type LeaseKeepAliveRequest struct {
|
|
type LeaseKeepAliveRequest struct {
|
|
|
- LeaseId int64 `protobuf:"varint,1,opt,name=lease_id,proto3" json:"lease_id,omitempty"`
|
|
|
|
|
|
|
+ ID int64 `protobuf:"varint,1,opt,proto3" json:"ID,omitempty"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (m *LeaseKeepAliveRequest) Reset() { *m = LeaseKeepAliveRequest{} }
|
|
func (m *LeaseKeepAliveRequest) Reset() { *m = LeaseKeepAliveRequest{} }
|
|
@@ -499,9 +499,8 @@ func (m *LeaseKeepAliveRequest) String() string { return proto.CompactTextString
|
|
|
func (*LeaseKeepAliveRequest) ProtoMessage() {}
|
|
func (*LeaseKeepAliveRequest) ProtoMessage() {}
|
|
|
|
|
|
|
|
type LeaseKeepAliveResponse struct {
|
|
type LeaseKeepAliveResponse struct {
|
|
|
- Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
|
|
|
|
- LeaseId int64 `protobuf:"varint,2,opt,name=lease_id,proto3" json:"lease_id,omitempty"`
|
|
|
|
|
- Ttl int64 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
|
|
|
|
|
|
+ Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
|
|
|
|
+ TTL int64 `protobuf:"varint,2,opt,proto3" json:"TTL,omitempty"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (m *LeaseKeepAliveResponse) Reset() { *m = LeaseKeepAliveResponse{} }
|
|
func (m *LeaseKeepAliveResponse) Reset() { *m = LeaseKeepAliveResponse{} }
|
|
@@ -1741,10 +1740,10 @@ func (m *LeaseCreateRequest) MarshalTo(data []byte) (int, error) {
|
|
|
_ = i
|
|
_ = i
|
|
|
var l int
|
|
var l int
|
|
|
_ = l
|
|
_ = l
|
|
|
- if m.Ttl != 0 {
|
|
|
|
|
|
|
+ if m.TTL != 0 {
|
|
|
data[i] = 0x8
|
|
data[i] = 0x8
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRpc(data, i, uint64(m.Ttl))
|
|
|
|
|
|
|
+ i = encodeVarintRpc(data, i, uint64(m.TTL))
|
|
|
}
|
|
}
|
|
|
return i, nil
|
|
return i, nil
|
|
|
}
|
|
}
|
|
@@ -1774,15 +1773,15 @@ func (m *LeaseCreateResponse) MarshalTo(data []byte) (int, error) {
|
|
|
}
|
|
}
|
|
|
i += n15
|
|
i += n15
|
|
|
}
|
|
}
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
|
|
+ if m.ID != 0 {
|
|
|
data[i] = 0x10
|
|
data[i] = 0x10
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRpc(data, i, uint64(m.LeaseId))
|
|
|
|
|
|
|
+ i = encodeVarintRpc(data, i, uint64(m.ID))
|
|
|
}
|
|
}
|
|
|
- if m.Ttl != 0 {
|
|
|
|
|
|
|
+ if m.TTL != 0 {
|
|
|
data[i] = 0x18
|
|
data[i] = 0x18
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRpc(data, i, uint64(m.Ttl))
|
|
|
|
|
|
|
+ i = encodeVarintRpc(data, i, uint64(m.TTL))
|
|
|
}
|
|
}
|
|
|
if len(m.Error) > 0 {
|
|
if len(m.Error) > 0 {
|
|
|
data[i] = 0x22
|
|
data[i] = 0x22
|
|
@@ -1808,10 +1807,10 @@ func (m *LeaseRevokeRequest) MarshalTo(data []byte) (int, error) {
|
|
|
_ = i
|
|
_ = i
|
|
|
var l int
|
|
var l int
|
|
|
_ = l
|
|
_ = l
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
|
|
+ if m.ID != 0 {
|
|
|
data[i] = 0x8
|
|
data[i] = 0x8
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRpc(data, i, uint64(m.LeaseId))
|
|
|
|
|
|
|
+ i = encodeVarintRpc(data, i, uint64(m.ID))
|
|
|
}
|
|
}
|
|
|
return i, nil
|
|
return i, nil
|
|
|
}
|
|
}
|
|
@@ -1859,10 +1858,10 @@ func (m *LeaseKeepAliveRequest) MarshalTo(data []byte) (int, error) {
|
|
|
_ = i
|
|
_ = i
|
|
|
var l int
|
|
var l int
|
|
|
_ = l
|
|
_ = l
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
|
|
+ if m.ID != 0 {
|
|
|
data[i] = 0x8
|
|
data[i] = 0x8
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRpc(data, i, uint64(m.LeaseId))
|
|
|
|
|
|
|
+ i = encodeVarintRpc(data, i, uint64(m.ID))
|
|
|
}
|
|
}
|
|
|
return i, nil
|
|
return i, nil
|
|
|
}
|
|
}
|
|
@@ -1892,15 +1891,10 @@ func (m *LeaseKeepAliveResponse) MarshalTo(data []byte) (int, error) {
|
|
|
}
|
|
}
|
|
|
i += n17
|
|
i += n17
|
|
|
}
|
|
}
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
|
|
+ if m.TTL != 0 {
|
|
|
data[i] = 0x10
|
|
data[i] = 0x10
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRpc(data, i, uint64(m.LeaseId))
|
|
|
|
|
- }
|
|
|
|
|
- if m.Ttl != 0 {
|
|
|
|
|
- data[i] = 0x18
|
|
|
|
|
- i++
|
|
|
|
|
- i = encodeVarintRpc(data, i, uint64(m.Ttl))
|
|
|
|
|
|
|
+ i = encodeVarintRpc(data, i, uint64(m.TTL))
|
|
|
}
|
|
}
|
|
|
return i, nil
|
|
return i, nil
|
|
|
}
|
|
}
|
|
@@ -2258,8 +2252,8 @@ func (m *WatchResponse) Size() (n int) {
|
|
|
func (m *LeaseCreateRequest) Size() (n int) {
|
|
func (m *LeaseCreateRequest) Size() (n int) {
|
|
|
var l int
|
|
var l int
|
|
|
_ = l
|
|
_ = l
|
|
|
- if m.Ttl != 0 {
|
|
|
|
|
- n += 1 + sovRpc(uint64(m.Ttl))
|
|
|
|
|
|
|
+ if m.TTL != 0 {
|
|
|
|
|
+ n += 1 + sovRpc(uint64(m.TTL))
|
|
|
}
|
|
}
|
|
|
return n
|
|
return n
|
|
|
}
|
|
}
|
|
@@ -2271,11 +2265,11 @@ func (m *LeaseCreateResponse) Size() (n int) {
|
|
|
l = m.Header.Size()
|
|
l = m.Header.Size()
|
|
|
n += 1 + l + sovRpc(uint64(l))
|
|
n += 1 + l + sovRpc(uint64(l))
|
|
|
}
|
|
}
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
- n += 1 + sovRpc(uint64(m.LeaseId))
|
|
|
|
|
|
|
+ if m.ID != 0 {
|
|
|
|
|
+ n += 1 + sovRpc(uint64(m.ID))
|
|
|
}
|
|
}
|
|
|
- if m.Ttl != 0 {
|
|
|
|
|
- n += 1 + sovRpc(uint64(m.Ttl))
|
|
|
|
|
|
|
+ if m.TTL != 0 {
|
|
|
|
|
+ n += 1 + sovRpc(uint64(m.TTL))
|
|
|
}
|
|
}
|
|
|
l = len(m.Error)
|
|
l = len(m.Error)
|
|
|
if l > 0 {
|
|
if l > 0 {
|
|
@@ -2287,8 +2281,8 @@ func (m *LeaseCreateResponse) Size() (n int) {
|
|
|
func (m *LeaseRevokeRequest) Size() (n int) {
|
|
func (m *LeaseRevokeRequest) Size() (n int) {
|
|
|
var l int
|
|
var l int
|
|
|
_ = l
|
|
_ = l
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
- n += 1 + sovRpc(uint64(m.LeaseId))
|
|
|
|
|
|
|
+ if m.ID != 0 {
|
|
|
|
|
+ n += 1 + sovRpc(uint64(m.ID))
|
|
|
}
|
|
}
|
|
|
return n
|
|
return n
|
|
|
}
|
|
}
|
|
@@ -2306,8 +2300,8 @@ func (m *LeaseRevokeResponse) Size() (n int) {
|
|
|
func (m *LeaseKeepAliveRequest) Size() (n int) {
|
|
func (m *LeaseKeepAliveRequest) Size() (n int) {
|
|
|
var l int
|
|
var l int
|
|
|
_ = l
|
|
_ = l
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
- n += 1 + sovRpc(uint64(m.LeaseId))
|
|
|
|
|
|
|
+ if m.ID != 0 {
|
|
|
|
|
+ n += 1 + sovRpc(uint64(m.ID))
|
|
|
}
|
|
}
|
|
|
return n
|
|
return n
|
|
|
}
|
|
}
|
|
@@ -2319,11 +2313,8 @@ func (m *LeaseKeepAliveResponse) Size() (n int) {
|
|
|
l = m.Header.Size()
|
|
l = m.Header.Size()
|
|
|
n += 1 + l + sovRpc(uint64(l))
|
|
n += 1 + l + sovRpc(uint64(l))
|
|
|
}
|
|
}
|
|
|
- if m.LeaseId != 0 {
|
|
|
|
|
- n += 1 + sovRpc(uint64(m.LeaseId))
|
|
|
|
|
- }
|
|
|
|
|
- if m.Ttl != 0 {
|
|
|
|
|
- n += 1 + sovRpc(uint64(m.Ttl))
|
|
|
|
|
|
|
+ if m.TTL != 0 {
|
|
|
|
|
+ n += 1 + sovRpc(uint64(m.TTL))
|
|
|
}
|
|
}
|
|
|
return n
|
|
return n
|
|
|
}
|
|
}
|
|
@@ -4351,16 +4342,16 @@ func (m *LeaseCreateRequest) Unmarshal(data []byte) error {
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
|
- return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType)
|
|
|
|
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
|
|
|
}
|
|
}
|
|
|
- m.Ttl = 0
|
|
|
|
|
|
|
+ m.TTL = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
b := data[iNdEx]
|
|
b := data[iNdEx]
|
|
|
iNdEx++
|
|
iNdEx++
|
|
|
- m.Ttl |= (int64(b) & 0x7F) << shift
|
|
|
|
|
|
|
+ m.TTL |= (int64(b) & 0x7F) << shift
|
|
|
if b < 0x80 {
|
|
if b < 0x80 {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
@@ -4442,32 +4433,32 @@ func (m *LeaseCreateResponse) Unmarshal(data []byte) error {
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
case 2:
|
|
case 2:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
|
- return fmt.Errorf("proto: wrong wireType = %d for field LeaseId", wireType)
|
|
|
|
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
|
|
}
|
|
}
|
|
|
- m.LeaseId = 0
|
|
|
|
|
|
|
+ m.ID = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
b := data[iNdEx]
|
|
b := data[iNdEx]
|
|
|
iNdEx++
|
|
iNdEx++
|
|
|
- m.LeaseId |= (int64(b) & 0x7F) << shift
|
|
|
|
|
|
|
+ m.ID |= (int64(b) & 0x7F) << shift
|
|
|
if b < 0x80 {
|
|
if b < 0x80 {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
case 3:
|
|
case 3:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
|
- return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType)
|
|
|
|
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
|
|
|
}
|
|
}
|
|
|
- m.Ttl = 0
|
|
|
|
|
|
|
+ m.TTL = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
b := data[iNdEx]
|
|
b := data[iNdEx]
|
|
|
iNdEx++
|
|
iNdEx++
|
|
|
- m.Ttl |= (int64(b) & 0x7F) << shift
|
|
|
|
|
|
|
+ m.TTL |= (int64(b) & 0x7F) << shift
|
|
|
if b < 0x80 {
|
|
if b < 0x80 {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
@@ -4545,16 +4536,16 @@ func (m *LeaseRevokeRequest) Unmarshal(data []byte) error {
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
|
- return fmt.Errorf("proto: wrong wireType = %d for field LeaseId", wireType)
|
|
|
|
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
|
|
}
|
|
}
|
|
|
- m.LeaseId = 0
|
|
|
|
|
|
|
+ m.ID = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
b := data[iNdEx]
|
|
b := data[iNdEx]
|
|
|
iNdEx++
|
|
iNdEx++
|
|
|
- m.LeaseId |= (int64(b) & 0x7F) << shift
|
|
|
|
|
|
|
+ m.ID |= (int64(b) & 0x7F) << shift
|
|
|
if b < 0x80 {
|
|
if b < 0x80 {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
@@ -4681,16 +4672,16 @@ func (m *LeaseKeepAliveRequest) Unmarshal(data []byte) error {
|
|
|
switch fieldNum {
|
|
switch fieldNum {
|
|
|
case 1:
|
|
case 1:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
|
- return fmt.Errorf("proto: wrong wireType = %d for field LeaseId", wireType)
|
|
|
|
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
|
|
}
|
|
}
|
|
|
- m.LeaseId = 0
|
|
|
|
|
|
|
+ m.ID = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
b := data[iNdEx]
|
|
b := data[iNdEx]
|
|
|
iNdEx++
|
|
iNdEx++
|
|
|
- m.LeaseId |= (int64(b) & 0x7F) << shift
|
|
|
|
|
|
|
+ m.ID |= (int64(b) & 0x7F) << shift
|
|
|
if b < 0x80 {
|
|
if b < 0x80 {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
@@ -4772,32 +4763,16 @@ func (m *LeaseKeepAliveResponse) Unmarshal(data []byte) error {
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
case 2:
|
|
case 2:
|
|
|
if wireType != 0 {
|
|
if wireType != 0 {
|
|
|
- return fmt.Errorf("proto: wrong wireType = %d for field LeaseId", wireType)
|
|
|
|
|
- }
|
|
|
|
|
- m.LeaseId = 0
|
|
|
|
|
- for shift := uint(0); ; shift += 7 {
|
|
|
|
|
- if iNdEx >= l {
|
|
|
|
|
- return io.ErrUnexpectedEOF
|
|
|
|
|
- }
|
|
|
|
|
- b := data[iNdEx]
|
|
|
|
|
- iNdEx++
|
|
|
|
|
- m.LeaseId |= (int64(b) & 0x7F) << shift
|
|
|
|
|
- if b < 0x80 {
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- case 3:
|
|
|
|
|
- if wireType != 0 {
|
|
|
|
|
- return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType)
|
|
|
|
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
|
|
|
}
|
|
}
|
|
|
- m.Ttl = 0
|
|
|
|
|
|
|
+ m.TTL = 0
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
if iNdEx >= l {
|
|
if iNdEx >= l {
|
|
|
return io.ErrUnexpectedEOF
|
|
return io.ErrUnexpectedEOF
|
|
|
}
|
|
}
|
|
|
b := data[iNdEx]
|
|
b := data[iNdEx]
|
|
|
iNdEx++
|
|
iNdEx++
|
|
|
- m.Ttl |= (int64(b) & 0x7F) << shift
|
|
|
|
|
|
|
+ m.TTL |= (int64(b) & 0x7F) << shift
|
|
|
if b < 0x80 {
|
|
if b < 0x80 {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|