|
|
@@ -1249,6 +1249,29 @@ func (m *AlarmResponse) GetAlarms() []*AlarmMember {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+type StatusRequest struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StatusRequest) Reset() { *m = StatusRequest{} }
|
|
|
+func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*StatusRequest) ProtoMessage() {}
|
|
|
+
|
|
|
+type StatusResponse struct {
|
|
|
+ Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
|
|
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StatusResponse) Reset() { *m = StatusResponse{} }
|
|
|
+func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*StatusResponse) ProtoMessage() {}
|
|
|
+
|
|
|
+func (m *StatusResponse) GetHeader() *ResponseHeader {
|
|
|
+ if m != nil {
|
|
|
+ return m.Header
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
type AuthEnableRequest struct {
|
|
|
}
|
|
|
|
|
|
@@ -1603,6 +1626,8 @@ func init() {
|
|
|
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")
|
|
|
@@ -2250,6 +2275,8 @@ var _Cluster_serviceDesc = grpc.ServiceDesc{
|
|
|
type MaintenanceClient interface {
|
|
|
// Alarm activates, deactivates, and queries alarms regarding cluster health.
|
|
|
Alarm(ctx context.Context, in *AlarmRequest, opts ...grpc.CallOption) (*AlarmResponse, error)
|
|
|
+ // Status gets the status of the member.
|
|
|
+ Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
|
|
|
Defragment(ctx context.Context, in *DefragmentRequest, opts ...grpc.CallOption) (*DefragmentResponse, error)
|
|
|
// Hash returns the hash of the local KV state for consistency checking purpose.
|
|
|
// This is designed for testing; do not use this in production when there
|
|
|
@@ -2274,6 +2301,15 @@ func (c *maintenanceClient) Alarm(ctx context.Context, in *AlarmRequest, opts ..
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *maintenanceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
|
|
|
+ out := new(StatusResponse)
|
|
|
+ err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/Status", in, out, c.cc, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
func (c *maintenanceClient) Defragment(ctx context.Context, in *DefragmentRequest, opts ...grpc.CallOption) (*DefragmentResponse, error) {
|
|
|
out := new(DefragmentResponse)
|
|
|
err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/Defragment", in, out, c.cc, opts...)
|
|
|
@@ -2297,6 +2333,8 @@ func (c *maintenanceClient) Hash(ctx context.Context, in *HashRequest, opts ...g
|
|
|
type MaintenanceServer interface {
|
|
|
// Alarm activates, deactivates, and queries alarms regarding cluster health.
|
|
|
Alarm(context.Context, *AlarmRequest) (*AlarmResponse, error)
|
|
|
+ // Status gets the status of the member.
|
|
|
+ Status(context.Context, *StatusRequest) (*StatusResponse, error)
|
|
|
Defragment(context.Context, *DefragmentRequest) (*DefragmentResponse, error)
|
|
|
// Hash returns the hash of the local KV state for consistency checking purpose.
|
|
|
// This is designed for testing; do not use this in production when there
|
|
|
@@ -2320,6 +2358,18 @@ func _Maintenance_Alarm_Handler(srv interface{}, ctx context.Context, dec func(i
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func _Maintenance_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
|
|
|
+ in := new(StatusRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ out, err := srv.(MaintenanceServer).Status(ctx, in)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
func _Maintenance_Defragment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
|
|
|
in := new(DefragmentRequest)
|
|
|
if err := dec(in); err != nil {
|
|
|
@@ -2352,6 +2402,10 @@ var _Maintenance_serviceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "Alarm",
|
|
|
Handler: _Maintenance_Alarm_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "Status",
|
|
|
+ Handler: _Maintenance_Status_Handler,
|
|
|
+ },
|
|
|
{
|
|
|
MethodName: "Defragment",
|
|
|
Handler: _Maintenance_Defragment_Handler,
|
|
|
@@ -4351,6 +4405,58 @@ func (m *AlarmResponse) MarshalTo(data []byte) (int, error) {
|
|
|
return i, nil
|
|
|
}
|
|
|
|
|
|
+func (m *StatusRequest) Marshal() (data []byte, err error) {
|
|
|
+ size := m.Size()
|
|
|
+ data = make([]byte, size)
|
|
|
+ n, err := m.MarshalTo(data)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return data[:n], nil
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StatusRequest) MarshalTo(data []byte) (int, error) {
|
|
|
+ var i int
|
|
|
+ _ = i
|
|
|
+ var l int
|
|
|
+ _ = l
|
|
|
+ return i, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StatusResponse) Marshal() (data []byte, err error) {
|
|
|
+ size := m.Size()
|
|
|
+ data = make([]byte, size)
|
|
|
+ n, err := m.MarshalTo(data)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return data[:n], nil
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StatusResponse) MarshalTo(data []byte) (int, error) {
|
|
|
+ var i int
|
|
|
+ _ = i
|
|
|
+ var l int
|
|
|
+ _ = l
|
|
|
+ if m.Header != nil {
|
|
|
+ data[i] = 0xa
|
|
|
+ i++
|
|
|
+ i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
+ n30, err := m.Header.MarshalTo(data[i:])
|
|
|
+ if err != nil {
|
|
|
+ return 0, err
|
|
|
+ }
|
|
|
+ i += n30
|
|
|
+ }
|
|
|
+ if len(m.Version) > 0 {
|
|
|
+ data[i] = 0x12
|
|
|
+ i++
|
|
|
+ i = encodeVarintRpc(data, i, uint64(len(m.Version)))
|
|
|
+ i += copy(data[i:], m.Version)
|
|
|
+ }
|
|
|
+ return i, nil
|
|
|
+}
|
|
|
+
|
|
|
func (m *AuthEnableRequest) Marshal() (data []byte, err error) {
|
|
|
size := m.Size()
|
|
|
data = make([]byte, size)
|
|
|
@@ -4652,11 +4758,11 @@ func (m *AuthEnableResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n30, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n31, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n30
|
|
|
+ i += n31
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4680,11 +4786,11 @@ func (m *AuthDisableResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n31, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n32, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n31
|
|
|
+ i += n32
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4708,11 +4814,11 @@ func (m *AuthenticateResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n32, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n33, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n32
|
|
|
+ i += n33
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4736,11 +4842,11 @@ func (m *AuthUserAddResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n33, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n34, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n33
|
|
|
+ i += n34
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4764,11 +4870,11 @@ func (m *AuthUserGetResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n34, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n35, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n34
|
|
|
+ i += n35
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4792,11 +4898,11 @@ func (m *AuthUserDeleteResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n35, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n36, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n35
|
|
|
+ i += n36
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4820,11 +4926,11 @@ func (m *AuthUserChangePasswordResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n36, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n37, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n36
|
|
|
+ i += n37
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4848,11 +4954,11 @@ func (m *AuthUserGrantResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n37, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n38, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n37
|
|
|
+ i += n38
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4876,11 +4982,11 @@ func (m *AuthUserRevokeResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n38, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n39, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n38
|
|
|
+ i += n39
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4904,11 +5010,11 @@ func (m *AuthRoleAddResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n39, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n40, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n39
|
|
|
+ i += n40
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4932,11 +5038,11 @@ func (m *AuthRoleGetResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n40, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n41, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n40
|
|
|
+ i += n41
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4960,11 +5066,11 @@ func (m *AuthRoleDeleteResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n41, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n42, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n41
|
|
|
+ i += n42
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -4988,11 +5094,11 @@ func (m *AuthRoleGrantResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n42, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n43, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n42
|
|
|
+ i += n43
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -5016,11 +5122,11 @@ func (m *AuthRoleRevokeResponse) MarshalTo(data []byte) (int, error) {
|
|
|
data[i] = 0xa
|
|
|
i++
|
|
|
i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
|
|
|
- n43, err := m.Header.MarshalTo(data[i:])
|
|
|
+ n44, err := m.Header.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
|
return 0, err
|
|
|
}
|
|
|
- i += n43
|
|
|
+ i += n44
|
|
|
}
|
|
|
return i, nil
|
|
|
}
|
|
|
@@ -5731,6 +5837,26 @@ func (m *AlarmResponse) Size() (n int) {
|
|
|
return n
|
|
|
}
|
|
|
|
|
|
+func (m *StatusRequest) Size() (n int) {
|
|
|
+ var l int
|
|
|
+ _ = l
|
|
|
+ return n
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StatusResponse) Size() (n int) {
|
|
|
+ var l int
|
|
|
+ _ = l
|
|
|
+ if m.Header != nil {
|
|
|
+ l = m.Header.Size()
|
|
|
+ n += 1 + l + sovRpc(uint64(l))
|
|
|
+ }
|
|
|
+ l = len(m.Version)
|
|
|
+ if l > 0 {
|
|
|
+ n += 1 + l + sovRpc(uint64(l))
|
|
|
+ }
|
|
|
+ return n
|
|
|
+}
|
|
|
+
|
|
|
func (m *AuthEnableRequest) Size() (n int) {
|
|
|
var l int
|
|
|
_ = l
|
|
|
@@ -10402,6 +10528,168 @@ func (m *AlarmResponse) Unmarshal(data []byte) error {
|
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
+func (m *StatusRequest) Unmarshal(data []byte) error {
|
|
|
+ l := len(data)
|
|
|
+ iNdEx := 0
|
|
|
+ for iNdEx < l {
|
|
|
+ preIndex := iNdEx
|
|
|
+ var wire uint64
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowRpc
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ wire |= (uint64(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fieldNum := int32(wire >> 3)
|
|
|
+ wireType := int(wire & 0x7)
|
|
|
+ if wireType == 4 {
|
|
|
+ return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group")
|
|
|
+ }
|
|
|
+ if fieldNum <= 0 {
|
|
|
+ return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
+ }
|
|
|
+ switch fieldNum {
|
|
|
+ default:
|
|
|
+ iNdEx = preIndex
|
|
|
+ skippy, err := skipRpc(data[iNdEx:])
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ if skippy < 0 {
|
|
|
+ return ErrInvalidLengthRpc
|
|
|
+ }
|
|
|
+ if (iNdEx + skippy) > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ iNdEx += skippy
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if iNdEx > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+func (m *StatusResponse) Unmarshal(data []byte) error {
|
|
|
+ l := len(data)
|
|
|
+ iNdEx := 0
|
|
|
+ for iNdEx < l {
|
|
|
+ preIndex := iNdEx
|
|
|
+ var wire uint64
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowRpc
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ wire |= (uint64(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fieldNum := int32(wire >> 3)
|
|
|
+ wireType := int(wire & 0x7)
|
|
|
+ if wireType == 4 {
|
|
|
+ return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group")
|
|
|
+ }
|
|
|
+ if fieldNum <= 0 {
|
|
|
+ return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
+ }
|
|
|
+ switch fieldNum {
|
|
|
+ case 1:
|
|
|
+ if wireType != 2 {
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
|
|
|
+ }
|
|
|
+ var msglen int
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowRpc
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ msglen |= (int(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if msglen < 0 {
|
|
|
+ return ErrInvalidLengthRpc
|
|
|
+ }
|
|
|
+ postIndex := iNdEx + msglen
|
|
|
+ if postIndex > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ if m.Header == nil {
|
|
|
+ m.Header = &ResponseHeader{}
|
|
|
+ }
|
|
|
+ if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ iNdEx = postIndex
|
|
|
+ case 2:
|
|
|
+ if wireType != 2 {
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
|
|
|
+ }
|
|
|
+ var stringLen uint64
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
+ if shift >= 64 {
|
|
|
+ return ErrIntOverflowRpc
|
|
|
+ }
|
|
|
+ if iNdEx >= l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ b := data[iNdEx]
|
|
|
+ iNdEx++
|
|
|
+ stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
+ if b < 0x80 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ intStringLen := int(stringLen)
|
|
|
+ if intStringLen < 0 {
|
|
|
+ return ErrInvalidLengthRpc
|
|
|
+ }
|
|
|
+ postIndex := iNdEx + intStringLen
|
|
|
+ if postIndex > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ m.Version = string(data[iNdEx:postIndex])
|
|
|
+ iNdEx = postIndex
|
|
|
+ default:
|
|
|
+ iNdEx = preIndex
|
|
|
+ skippy, err := skipRpc(data[iNdEx:])
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ if skippy < 0 {
|
|
|
+ return ErrInvalidLengthRpc
|
|
|
+ }
|
|
|
+ if (iNdEx + skippy) > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ iNdEx += skippy
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if iNdEx > l {
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
func (m *AuthEnableRequest) Unmarshal(data []byte) error {
|
|
|
l := len(data)
|
|
|
iNdEx := 0
|