diff --git a/pkg/pb/gracefulexit.pb.go b/pkg/pb/gracefulexit.pb.go new file mode 100644 index 000000000..04528a01d --- /dev/null +++ b/pkg/pb/gracefulexit.pb.go @@ -0,0 +1,1006 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gracefulexit.proto + +package pb + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + math "math" + drpc "storj.io/drpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TransferFailed_Error int32 + +const ( + TransferFailed_NOT_FOUND TransferFailed_Error = 0 + TransferFailed_STORAGE_NODE_UNAVAILABLE TransferFailed_Error = 1 + TransferFailed_UNKNOWN TransferFailed_Error = 2 +) + +var TransferFailed_Error_name = map[int32]string{ + 0: "NOT_FOUND", + 1: "STORAGE_NODE_UNAVAILABLE", + 2: "UNKNOWN", +} + +var TransferFailed_Error_value = map[string]int32{ + "NOT_FOUND": 0, + "STORAGE_NODE_UNAVAILABLE": 1, + "UNKNOWN": 2, +} + +func (x TransferFailed_Error) String() string { + return proto.EnumName(TransferFailed_Error_name, int32(x)) +} + +func (TransferFailed_Error) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{1, 0} +} + +type ExitFailed_Reason int32 + +const ( + ExitFailed_VERIFICATION_FAILED ExitFailed_Reason = 0 +) + +var ExitFailed_Reason_name = map[int32]string{ + 0: "VERIFICATION_FAILED", +} + +var ExitFailed_Reason_value = map[string]int32{ + "VERIFICATION_FAILED": 0, +} + +func (x ExitFailed_Reason) String() string { + return proto.EnumName(ExitFailed_Reason_name, int32(x)) +} + +func (ExitFailed_Reason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{7, 0} +} + +type TransferSucceeded struct { + AddressedOrderLimit *AddressedOrderLimit `protobuf:"bytes,1,opt,name=addressed_order_limit,json=addressedOrderLimit,proto3" json:"addressed_order_limit,omitempty"` + OriginalPieceHash *PieceHash `protobuf:"bytes,2,opt,name=original_piece_hash,json=originalPieceHash,proto3" json:"original_piece_hash,omitempty"` + ReplacementPieceHash *PieceHash `protobuf:"bytes,3,opt,name=replacement_piece_hash,json=replacementPieceHash,proto3" json:"replacement_piece_hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransferSucceeded) Reset() { *m = TransferSucceeded{} } +func (m *TransferSucceeded) String() string { return proto.CompactTextString(m) } +func (*TransferSucceeded) ProtoMessage() {} +func (*TransferSucceeded) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{0} +} +func (m *TransferSucceeded) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransferSucceeded.Unmarshal(m, b) +} +func (m *TransferSucceeded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransferSucceeded.Marshal(b, m, deterministic) +} +func (m *TransferSucceeded) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferSucceeded.Merge(m, src) +} +func (m *TransferSucceeded) XXX_Size() int { + return xxx_messageInfo_TransferSucceeded.Size(m) +} +func (m *TransferSucceeded) XXX_DiscardUnknown() { + xxx_messageInfo_TransferSucceeded.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferSucceeded proto.InternalMessageInfo + +func (m *TransferSucceeded) GetAddressedOrderLimit() *AddressedOrderLimit { + if m != nil { + return m.AddressedOrderLimit + } + return nil +} + +func (m *TransferSucceeded) GetOriginalPieceHash() *PieceHash { + if m != nil { + return m.OriginalPieceHash + } + return nil +} + +func (m *TransferSucceeded) GetReplacementPieceHash() *PieceHash { + if m != nil { + return m.ReplacementPieceHash + } + return nil +} + +type TransferFailed struct { + PieceId PieceID `protobuf:"bytes,1,opt,name=piece_id,json=pieceId,proto3,customtype=PieceID" json:"piece_id"` + Error TransferFailed_Error `protobuf:"varint,2,opt,name=error,proto3,enum=gracefulexit.TransferFailed_Error" json:"error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransferFailed) Reset() { *m = TransferFailed{} } +func (m *TransferFailed) String() string { return proto.CompactTextString(m) } +func (*TransferFailed) ProtoMessage() {} +func (*TransferFailed) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{1} +} +func (m *TransferFailed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransferFailed.Unmarshal(m, b) +} +func (m *TransferFailed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransferFailed.Marshal(b, m, deterministic) +} +func (m *TransferFailed) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferFailed.Merge(m, src) +} +func (m *TransferFailed) XXX_Size() int { + return xxx_messageInfo_TransferFailed.Size(m) +} +func (m *TransferFailed) XXX_DiscardUnknown() { + xxx_messageInfo_TransferFailed.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferFailed proto.InternalMessageInfo + +func (m *TransferFailed) GetError() TransferFailed_Error { + if m != nil { + return m.Error + } + return TransferFailed_NOT_FOUND +} + +type StorageNodeMessage struct { + // Types that are valid to be assigned to Message: + // *StorageNodeMessage_Succeeded + // *StorageNodeMessage_Failed + Message isStorageNodeMessage_Message `protobuf_oneof:"Message"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StorageNodeMessage) Reset() { *m = StorageNodeMessage{} } +func (m *StorageNodeMessage) String() string { return proto.CompactTextString(m) } +func (*StorageNodeMessage) ProtoMessage() {} +func (*StorageNodeMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{2} +} +func (m *StorageNodeMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StorageNodeMessage.Unmarshal(m, b) +} +func (m *StorageNodeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StorageNodeMessage.Marshal(b, m, deterministic) +} +func (m *StorageNodeMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageNodeMessage.Merge(m, src) +} +func (m *StorageNodeMessage) XXX_Size() int { + return xxx_messageInfo_StorageNodeMessage.Size(m) +} +func (m *StorageNodeMessage) XXX_DiscardUnknown() { + xxx_messageInfo_StorageNodeMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageNodeMessage proto.InternalMessageInfo + +type isStorageNodeMessage_Message interface { + isStorageNodeMessage_Message() +} + +type StorageNodeMessage_Succeeded struct { + Succeeded *TransferSucceeded `protobuf:"bytes,1,opt,name=succeeded,proto3,oneof"` +} +type StorageNodeMessage_Failed struct { + Failed *TransferFailed `protobuf:"bytes,2,opt,name=failed,proto3,oneof"` +} + +func (*StorageNodeMessage_Succeeded) isStorageNodeMessage_Message() {} +func (*StorageNodeMessage_Failed) isStorageNodeMessage_Message() {} + +func (m *StorageNodeMessage) GetMessage() isStorageNodeMessage_Message { + if m != nil { + return m.Message + } + return nil +} + +func (m *StorageNodeMessage) GetSucceeded() *TransferSucceeded { + if x, ok := m.GetMessage().(*StorageNodeMessage_Succeeded); ok { + return x.Succeeded + } + return nil +} + +func (m *StorageNodeMessage) GetFailed() *TransferFailed { + if x, ok := m.GetMessage().(*StorageNodeMessage_Failed); ok { + return x.Failed + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*StorageNodeMessage) 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 _StorageNodeMessage_OneofMarshaler, _StorageNodeMessage_OneofUnmarshaler, _StorageNodeMessage_OneofSizer, []interface{}{ + (*StorageNodeMessage_Succeeded)(nil), + (*StorageNodeMessage_Failed)(nil), + } +} + +func _StorageNodeMessage_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*StorageNodeMessage) + // Message + switch x := m.Message.(type) { + case *StorageNodeMessage_Succeeded: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Succeeded); err != nil { + return err + } + case *StorageNodeMessage_Failed: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Failed); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("StorageNodeMessage.Message has unexpected type %T", x) + } + return nil +} + +func _StorageNodeMessage_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*StorageNodeMessage) + switch tag { + case 1: // Message.succeeded + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TransferSucceeded) + err := b.DecodeMessage(msg) + m.Message = &StorageNodeMessage_Succeeded{msg} + return true, err + case 2: // Message.failed + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TransferFailed) + err := b.DecodeMessage(msg) + m.Message = &StorageNodeMessage_Failed{msg} + return true, err + default: + return false, nil + } +} + +func _StorageNodeMessage_OneofSizer(msg proto.Message) (n int) { + m := msg.(*StorageNodeMessage) + // Message + switch x := m.Message.(type) { + case *StorageNodeMessage_Succeeded: + s := proto.Size(x.Succeeded) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *StorageNodeMessage_Failed: + s := proto.Size(x.Failed) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type NotReady struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotReady) Reset() { *m = NotReady{} } +func (m *NotReady) String() string { return proto.CompactTextString(m) } +func (*NotReady) ProtoMessage() {} +func (*NotReady) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{3} +} +func (m *NotReady) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NotReady.Unmarshal(m, b) +} +func (m *NotReady) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NotReady.Marshal(b, m, deterministic) +} +func (m *NotReady) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotReady.Merge(m, src) +} +func (m *NotReady) XXX_Size() int { + return xxx_messageInfo_NotReady.Size(m) +} +func (m *NotReady) XXX_DiscardUnknown() { + xxx_messageInfo_NotReady.DiscardUnknown(m) +} + +var xxx_messageInfo_NotReady proto.InternalMessageInfo + +type TransferPiece struct { + PieceId PieceID `protobuf:"bytes,1,opt,name=piece_id,json=pieceId,proto3,customtype=PieceID" json:"piece_id"` + PrivateKey PiecePrivateKey `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3,customtype=PiecePrivateKey" json:"private_key"` + // addressed_order_limit contains the new piece id. + AddressedOrderLimit *AddressedOrderLimit `protobuf:"bytes,3,opt,name=addressed_order_limit,json=addressedOrderLimit,proto3" json:"addressed_order_limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransferPiece) Reset() { *m = TransferPiece{} } +func (m *TransferPiece) String() string { return proto.CompactTextString(m) } +func (*TransferPiece) ProtoMessage() {} +func (*TransferPiece) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{4} +} +func (m *TransferPiece) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransferPiece.Unmarshal(m, b) +} +func (m *TransferPiece) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransferPiece.Marshal(b, m, deterministic) +} +func (m *TransferPiece) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferPiece.Merge(m, src) +} +func (m *TransferPiece) XXX_Size() int { + return xxx_messageInfo_TransferPiece.Size(m) +} +func (m *TransferPiece) XXX_DiscardUnknown() { + xxx_messageInfo_TransferPiece.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferPiece proto.InternalMessageInfo + +func (m *TransferPiece) GetAddressedOrderLimit() *AddressedOrderLimit { + if m != nil { + return m.AddressedOrderLimit + } + return nil +} + +type DeletePiece struct { + PieceId PieceID `protobuf:"bytes,1,opt,name=piece_id,json=pieceId,proto3,customtype=PieceID" json:"piece_id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeletePiece) Reset() { *m = DeletePiece{} } +func (m *DeletePiece) String() string { return proto.CompactTextString(m) } +func (*DeletePiece) ProtoMessage() {} +func (*DeletePiece) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{5} +} +func (m *DeletePiece) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeletePiece.Unmarshal(m, b) +} +func (m *DeletePiece) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeletePiece.Marshal(b, m, deterministic) +} +func (m *DeletePiece) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeletePiece.Merge(m, src) +} +func (m *DeletePiece) XXX_Size() int { + return xxx_messageInfo_DeletePiece.Size(m) +} +func (m *DeletePiece) XXX_DiscardUnknown() { + xxx_messageInfo_DeletePiece.DiscardUnknown(m) +} + +var xxx_messageInfo_DeletePiece proto.InternalMessageInfo + +type ExitCompleted struct { + // when everything is completed + ExitCompleteSignature []byte `protobuf:"bytes,1,opt,name=exit_complete_signature,json=exitCompleteSignature,proto3" json:"exit_complete_signature,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExitCompleted) Reset() { *m = ExitCompleted{} } +func (m *ExitCompleted) String() string { return proto.CompactTextString(m) } +func (*ExitCompleted) ProtoMessage() {} +func (*ExitCompleted) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{6} +} +func (m *ExitCompleted) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExitCompleted.Unmarshal(m, b) +} +func (m *ExitCompleted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExitCompleted.Marshal(b, m, deterministic) +} +func (m *ExitCompleted) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExitCompleted.Merge(m, src) +} +func (m *ExitCompleted) XXX_Size() int { + return xxx_messageInfo_ExitCompleted.Size(m) +} +func (m *ExitCompleted) XXX_DiscardUnknown() { + xxx_messageInfo_ExitCompleted.DiscardUnknown(m) +} + +var xxx_messageInfo_ExitCompleted proto.InternalMessageInfo + +func (m *ExitCompleted) GetExitCompleteSignature() []byte { + if m != nil { + return m.ExitCompleteSignature + } + return nil +} + +type ExitFailed struct { + // on failure + ExitFailureSignature []byte `protobuf:"bytes,1,opt,name=exit_failure_signature,json=exitFailureSignature,proto3" json:"exit_failure_signature,omitempty"` + Reason ExitFailed_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=gracefulexit.ExitFailed_Reason" json:"reason,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExitFailed) Reset() { *m = ExitFailed{} } +func (m *ExitFailed) String() string { return proto.CompactTextString(m) } +func (*ExitFailed) ProtoMessage() {} +func (*ExitFailed) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{7} +} +func (m *ExitFailed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExitFailed.Unmarshal(m, b) +} +func (m *ExitFailed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExitFailed.Marshal(b, m, deterministic) +} +func (m *ExitFailed) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExitFailed.Merge(m, src) +} +func (m *ExitFailed) XXX_Size() int { + return xxx_messageInfo_ExitFailed.Size(m) +} +func (m *ExitFailed) XXX_DiscardUnknown() { + xxx_messageInfo_ExitFailed.DiscardUnknown(m) +} + +var xxx_messageInfo_ExitFailed proto.InternalMessageInfo + +func (m *ExitFailed) GetExitFailureSignature() []byte { + if m != nil { + return m.ExitFailureSignature + } + return nil +} + +func (m *ExitFailed) GetReason() ExitFailed_Reason { + if m != nil { + return m.Reason + } + return ExitFailed_VERIFICATION_FAILED +} + +type SatelliteMessage struct { + // Types that are valid to be assigned to Message: + // *SatelliteMessage_NotReady + // *SatelliteMessage_TransferPiece + // *SatelliteMessage_DeletePiece + // *SatelliteMessage_ExitCompleted + // *SatelliteMessage_ExitFailed + Message isSatelliteMessage_Message `protobuf_oneof:"Message"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SatelliteMessage) Reset() { *m = SatelliteMessage{} } +func (m *SatelliteMessage) String() string { return proto.CompactTextString(m) } +func (*SatelliteMessage) ProtoMessage() {} +func (*SatelliteMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_8f0acbf2ce5fa631, []int{8} +} +func (m *SatelliteMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SatelliteMessage.Unmarshal(m, b) +} +func (m *SatelliteMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SatelliteMessage.Marshal(b, m, deterministic) +} +func (m *SatelliteMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SatelliteMessage.Merge(m, src) +} +func (m *SatelliteMessage) XXX_Size() int { + return xxx_messageInfo_SatelliteMessage.Size(m) +} +func (m *SatelliteMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SatelliteMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SatelliteMessage proto.InternalMessageInfo + +type isSatelliteMessage_Message interface { + isSatelliteMessage_Message() +} + +type SatelliteMessage_NotReady struct { + NotReady *NotReady `protobuf:"bytes,1,opt,name=not_ready,json=notReady,proto3,oneof"` +} +type SatelliteMessage_TransferPiece struct { + TransferPiece *TransferPiece `protobuf:"bytes,2,opt,name=transfer_piece,json=transferPiece,proto3,oneof"` +} +type SatelliteMessage_DeletePiece struct { + DeletePiece *DeletePiece `protobuf:"bytes,3,opt,name=delete_piece,json=deletePiece,proto3,oneof"` +} +type SatelliteMessage_ExitCompleted struct { + ExitCompleted *ExitCompleted `protobuf:"bytes,4,opt,name=exit_completed,json=exitCompleted,proto3,oneof"` +} +type SatelliteMessage_ExitFailed struct { + ExitFailed *ExitFailed `protobuf:"bytes,5,opt,name=exit_failed,json=exitFailed,proto3,oneof"` +} + +func (*SatelliteMessage_NotReady) isSatelliteMessage_Message() {} +func (*SatelliteMessage_TransferPiece) isSatelliteMessage_Message() {} +func (*SatelliteMessage_DeletePiece) isSatelliteMessage_Message() {} +func (*SatelliteMessage_ExitCompleted) isSatelliteMessage_Message() {} +func (*SatelliteMessage_ExitFailed) isSatelliteMessage_Message() {} + +func (m *SatelliteMessage) GetMessage() isSatelliteMessage_Message { + if m != nil { + return m.Message + } + return nil +} + +func (m *SatelliteMessage) GetNotReady() *NotReady { + if x, ok := m.GetMessage().(*SatelliteMessage_NotReady); ok { + return x.NotReady + } + return nil +} + +func (m *SatelliteMessage) GetTransferPiece() *TransferPiece { + if x, ok := m.GetMessage().(*SatelliteMessage_TransferPiece); ok { + return x.TransferPiece + } + return nil +} + +func (m *SatelliteMessage) GetDeletePiece() *DeletePiece { + if x, ok := m.GetMessage().(*SatelliteMessage_DeletePiece); ok { + return x.DeletePiece + } + return nil +} + +func (m *SatelliteMessage) GetExitCompleted() *ExitCompleted { + if x, ok := m.GetMessage().(*SatelliteMessage_ExitCompleted); ok { + return x.ExitCompleted + } + return nil +} + +func (m *SatelliteMessage) GetExitFailed() *ExitFailed { + if x, ok := m.GetMessage().(*SatelliteMessage_ExitFailed); ok { + return x.ExitFailed + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SatelliteMessage) 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 _SatelliteMessage_OneofMarshaler, _SatelliteMessage_OneofUnmarshaler, _SatelliteMessage_OneofSizer, []interface{}{ + (*SatelliteMessage_NotReady)(nil), + (*SatelliteMessage_TransferPiece)(nil), + (*SatelliteMessage_DeletePiece)(nil), + (*SatelliteMessage_ExitCompleted)(nil), + (*SatelliteMessage_ExitFailed)(nil), + } +} + +func _SatelliteMessage_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SatelliteMessage) + // Message + switch x := m.Message.(type) { + case *SatelliteMessage_NotReady: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.NotReady); err != nil { + return err + } + case *SatelliteMessage_TransferPiece: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.TransferPiece); err != nil { + return err + } + case *SatelliteMessage_DeletePiece: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.DeletePiece); err != nil { + return err + } + case *SatelliteMessage_ExitCompleted: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ExitCompleted); err != nil { + return err + } + case *SatelliteMessage_ExitFailed: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ExitFailed); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SatelliteMessage.Message has unexpected type %T", x) + } + return nil +} + +func _SatelliteMessage_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SatelliteMessage) + switch tag { + case 1: // Message.not_ready + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(NotReady) + err := b.DecodeMessage(msg) + m.Message = &SatelliteMessage_NotReady{msg} + return true, err + case 2: // Message.transfer_piece + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TransferPiece) + err := b.DecodeMessage(msg) + m.Message = &SatelliteMessage_TransferPiece{msg} + return true, err + case 3: // Message.delete_piece + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DeletePiece) + err := b.DecodeMessage(msg) + m.Message = &SatelliteMessage_DeletePiece{msg} + return true, err + case 4: // Message.exit_completed + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ExitCompleted) + err := b.DecodeMessage(msg) + m.Message = &SatelliteMessage_ExitCompleted{msg} + return true, err + case 5: // Message.exit_failed + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ExitFailed) + err := b.DecodeMessage(msg) + m.Message = &SatelliteMessage_ExitFailed{msg} + return true, err + default: + return false, nil + } +} + +func _SatelliteMessage_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SatelliteMessage) + // Message + switch x := m.Message.(type) { + case *SatelliteMessage_NotReady: + s := proto.Size(x.NotReady) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SatelliteMessage_TransferPiece: + s := proto.Size(x.TransferPiece) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SatelliteMessage_DeletePiece: + s := proto.Size(x.DeletePiece) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SatelliteMessage_ExitCompleted: + s := proto.Size(x.ExitCompleted) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SatelliteMessage_ExitFailed: + s := proto.Size(x.ExitFailed) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterEnum("gracefulexit.TransferFailed_Error", TransferFailed_Error_name, TransferFailed_Error_value) + proto.RegisterEnum("gracefulexit.ExitFailed_Reason", ExitFailed_Reason_name, ExitFailed_Reason_value) + proto.RegisterType((*TransferSucceeded)(nil), "gracefulexit.TransferSucceeded") + proto.RegisterType((*TransferFailed)(nil), "gracefulexit.TransferFailed") + proto.RegisterType((*StorageNodeMessage)(nil), "gracefulexit.StorageNodeMessage") + proto.RegisterType((*NotReady)(nil), "gracefulexit.NotReady") + proto.RegisterType((*TransferPiece)(nil), "gracefulexit.TransferPiece") + proto.RegisterType((*DeletePiece)(nil), "gracefulexit.DeletePiece") + proto.RegisterType((*ExitCompleted)(nil), "gracefulexit.ExitCompleted") + proto.RegisterType((*ExitFailed)(nil), "gracefulexit.ExitFailed") + proto.RegisterType((*SatelliteMessage)(nil), "gracefulexit.SatelliteMessage") +} + +func init() { proto.RegisterFile("gracefulexit.proto", fileDescriptor_8f0acbf2ce5fa631) } + +var fileDescriptor_8f0acbf2ce5fa631 = []byte{ + // 742 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdb, 0x6e, 0xeb, 0x44, + 0x14, 0xb5, 0x73, 0x4e, 0x93, 0x66, 0xe7, 0x72, 0xd2, 0xe9, 0x69, 0x1b, 0xca, 0x81, 0x1e, 0xfc, + 0x54, 0xf1, 0x10, 0xa1, 0x72, 0x17, 0x12, 0xc8, 0x69, 0xae, 0x6a, 0xb0, 0xcb, 0x24, 0x2d, 0x12, + 0x2f, 0xd6, 0x34, 0xde, 0x49, 0x2c, 0x1c, 0x3b, 0x1a, 0x4f, 0x50, 0xfb, 0x27, 0x3c, 0xf1, 0x1f, + 0xfc, 0x41, 0xbf, 0x01, 0x89, 0x7e, 0x04, 0x5f, 0x80, 0x3c, 0x1e, 0xbb, 0x71, 0x2f, 0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b7, 0xef, 0xa1, 0xea, 0x4a, 0xdb, 0x14, 0x47, 0x12, 0x80, 0x0f, 0xf2, 0x1c, 0x1b, 0xc6, 0x0e, + 0x34, 0x5a, 0x71, 0x37, 0x7c, 0xee, 0x40, 0x3d, 0x67, 0x95, 0xdb, 0x7c, 0xfd, 0x94, 0x8a, 0x9c, + 0xbf, 0xb1, 0x0a, 0xcc, 0x19, 0xfe, 0x1d, 0x54, 0x32, 0xa7, 0xd0, 0x6d, 0x6e, 0x49, 0x8a, 0xe6, + 0x73, 0x83, 0x1f, 0x68, 0x14, 0x30, 0xdb, 0x6d, 0xbc, 0xad, 0x93, 0x05, 0xec, 0x65, 0xe3, 0xed, + 0xab, 0xe6, 0xb8, 0x8f, 0xd8, 0x50, 0x3a, 0xe7, 0xe1, 0x14, 0xa3, 0x88, 0xbc, 0xcf, 0xd3, 0x3e, + 0xfe, 0x97, 0x38, 0xfc, 0xf8, 0x01, 0xe2, 0x81, 0x61, 0xc7, 0xfa, 0x67, 0x7a, 0xfb, 0xf5, 0x2f, + 0x85, 0xd5, 0xd5, 0x55, 0x51, 0x7e, 0x1e, 0x3e, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x43, 0x36, + 0xf6, 0x79, 0x6c, 0x06, 0x00, 0x00, +} + +type DRPCSatelliteGracefulExitClient interface { + DRPCConn() drpc.Conn + + // Process is called by storage nodes to initiate the graceful exit, get pieces to transfer, and receive exit status. + Process(ctx context.Context) (DRPCSatelliteGracefulExit_ProcessClient, error) +} + +type drpcSatelliteGracefulExitClient struct { + cc drpc.Conn +} + +func NewDRPCSatelliteGracefulExitClient(cc drpc.Conn) DRPCSatelliteGracefulExitClient { + return &drpcSatelliteGracefulExitClient{cc} +} + +func (c *drpcSatelliteGracefulExitClient) DRPCConn() drpc.Conn { return c.cc } + +func (c *drpcSatelliteGracefulExitClient) Process(ctx context.Context) (DRPCSatelliteGracefulExit_ProcessClient, error) { + stream, err := c.cc.NewStream(ctx, "/gracefulexit.SatelliteGracefulExit/Process") + if err != nil { + return nil, err + } + x := &drpcSatelliteGracefulExitProcessClient{stream} + return x, nil +} + +type DRPCSatelliteGracefulExit_ProcessClient interface { + drpc.Stream + Send(*StorageNodeMessage) error + Recv() (*SatelliteMessage, error) +} + +type drpcSatelliteGracefulExitProcessClient struct { + drpc.Stream +} + +func (x *drpcSatelliteGracefulExitProcessClient) Send(m *StorageNodeMessage) error { + return x.MsgSend(m) +} + +func (x *drpcSatelliteGracefulExitProcessClient) Recv() (*SatelliteMessage, error) { + m := new(SatelliteMessage) + if err := x.MsgRecv(m); err != nil { + return nil, err + } + return m, nil +} + +type DRPCSatelliteGracefulExitServer interface { + // Process is called by storage nodes to initiate the graceful exit, get pieces to transfer, and receive exit status. + Process(DRPCSatelliteGracefulExit_ProcessStream) error +} + +type DRPCSatelliteGracefulExitDescription struct{} + +func (DRPCSatelliteGracefulExitDescription) NumMethods() int { return 1 } + +func (DRPCSatelliteGracefulExitDescription) Method(n int) (string, drpc.Handler, interface{}, bool) { + switch n { + case 0: + return "/gracefulexit.SatelliteGracefulExit/Process", + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return nil, srv.(DRPCSatelliteGracefulExitServer). + Process( + &drpcSatelliteGracefulExitProcessStream{in1.(drpc.Stream)}, + ) + }, DRPCSatelliteGracefulExitServer.Process, true + default: + return "", nil, nil, false + } +} + +func DRPCRegisterSatelliteGracefulExit(srv drpc.Server, impl DRPCSatelliteGracefulExitServer) { + srv.Register(impl, DRPCSatelliteGracefulExitDescription{}) +} + +type DRPCSatelliteGracefulExit_ProcessStream interface { + drpc.Stream + Send(*SatelliteMessage) error + Recv() (*StorageNodeMessage, error) +} + +type drpcSatelliteGracefulExitProcessStream struct { + drpc.Stream +} + +func (x *drpcSatelliteGracefulExitProcessStream) Send(m *SatelliteMessage) error { + return x.MsgSend(m) +} + +func (x *drpcSatelliteGracefulExitProcessStream) Recv() (*StorageNodeMessage, error) { + m := new(StorageNodeMessage) + if err := x.MsgRecv(m); err != nil { + return nil, err + } + return m, nil +} + +// 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 + +// SatelliteGracefulExitClient is the client API for SatelliteGracefulExit service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SatelliteGracefulExitClient interface { + // Process is called by storage nodes to initiate the graceful exit, get pieces to transfer, and receive exit status. + Process(ctx context.Context, opts ...grpc.CallOption) (SatelliteGracefulExit_ProcessClient, error) +} + +type satelliteGracefulExitClient struct { + cc *grpc.ClientConn +} + +func NewSatelliteGracefulExitClient(cc *grpc.ClientConn) SatelliteGracefulExitClient { + return &satelliteGracefulExitClient{cc} +} + +func (c *satelliteGracefulExitClient) Process(ctx context.Context, opts ...grpc.CallOption) (SatelliteGracefulExit_ProcessClient, error) { + stream, err := c.cc.NewStream(ctx, &_SatelliteGracefulExit_serviceDesc.Streams[0], "/gracefulexit.SatelliteGracefulExit/Process", opts...) + if err != nil { + return nil, err + } + x := &satelliteGracefulExitProcessClient{stream} + return x, nil +} + +type SatelliteGracefulExit_ProcessClient interface { + Send(*StorageNodeMessage) error + Recv() (*SatelliteMessage, error) + grpc.ClientStream +} + +type satelliteGracefulExitProcessClient struct { + grpc.ClientStream +} + +func (x *satelliteGracefulExitProcessClient) Send(m *StorageNodeMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *satelliteGracefulExitProcessClient) Recv() (*SatelliteMessage, error) { + m := new(SatelliteMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// SatelliteGracefulExitServer is the server API for SatelliteGracefulExit service. +type SatelliteGracefulExitServer interface { + // Process is called by storage nodes to initiate the graceful exit, get pieces to transfer, and receive exit status. + Process(SatelliteGracefulExit_ProcessServer) error +} + +func RegisterSatelliteGracefulExitServer(s *grpc.Server, srv SatelliteGracefulExitServer) { + s.RegisterService(&_SatelliteGracefulExit_serviceDesc, srv) +} + +func _SatelliteGracefulExit_Process_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(SatelliteGracefulExitServer).Process(&satelliteGracefulExitProcessServer{stream}) +} + +type SatelliteGracefulExit_ProcessServer interface { + Send(*SatelliteMessage) error + Recv() (*StorageNodeMessage, error) + grpc.ServerStream +} + +type satelliteGracefulExitProcessServer struct { + grpc.ServerStream +} + +func (x *satelliteGracefulExitProcessServer) Send(m *SatelliteMessage) error { + return x.ServerStream.SendMsg(m) +} + +func (x *satelliteGracefulExitProcessServer) Recv() (*StorageNodeMessage, error) { + m := new(StorageNodeMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _SatelliteGracefulExit_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gracefulexit.SatelliteGracefulExit", + HandlerType: (*SatelliteGracefulExitServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Process", + Handler: _SatelliteGracefulExit_Process_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "gracefulexit.proto", +} diff --git a/pkg/pb/gracefulexit.proto b/pkg/pb/gracefulexit.proto new file mode 100644 index 000000000..ec086bb2e --- /dev/null +++ b/pkg/pb/gracefulexit.proto @@ -0,0 +1,77 @@ +// Copyright (C) 2019 Storj Labs, Inc. +// See LICENSE for copying information. + +syntax = "proto3"; +option go_package = "pb"; + +import "gogo.proto"; +import "metainfo.proto"; +import "orders.proto"; + +package gracefulexit; + +service SatelliteGracefulExit { + // Process is called by storage nodes to initiate the graceful exit, get pieces to transfer, and receive exit status. + rpc Process(stream StorageNodeMessage) returns (stream SatelliteMessage); +} + +message TransferSucceeded { + metainfo.AddressedOrderLimit addressed_order_limit = 1; + orders.PieceHash original_piece_hash = 2; + orders.PieceHash replacement_piece_hash = 3; +} + +message TransferFailed { + bytes piece_id = 1 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false]; + enum Error { + NOT_FOUND = 0; + STORAGE_NODE_UNAVAILABLE = 1; + UNKNOWN = 2; + } + Error error = 2; +} + +message StorageNodeMessage { + oneof Message { + TransferSucceeded succeeded = 1; + TransferFailed failed = 2; + } +} + +message NotReady {} + +message TransferPiece { + bytes piece_id = 1 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false]; // the current piece-id + bytes private_key = 2 [(gogoproto.customtype) = "PiecePrivateKey", (gogoproto.nullable) = false]; + // addressed_order_limit contains the new piece id. + metainfo.AddressedOrderLimit addressed_order_limit =3; +} + +message DeletePiece { + bytes piece_id = 1 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false]; +} + +message ExitCompleted { + // when everything is completed + bytes exit_complete_signature = 1; +} + + +message ExitFailed { + enum Reason { + VERIFICATION_FAILED = 0; + } + // on failure + bytes exit_failure_signature = 1; + Reason reason = 2; +} + +message SatelliteMessage { + oneof Message { + NotReady not_ready = 1; + TransferPiece transfer_piece = 2; + DeletePiece delete_piece = 3; + ExitCompleted exit_completed = 4; + ExitFailed exit_failed = 5; + } +} \ No newline at end of file diff --git a/pkg/pb/inspector.pb.go b/pkg/pb/inspector.pb.go index 8c4b9c238..abd5441ee 100644 --- a/pkg/pb/inspector.pb.go +++ b/pkg/pb/inspector.pb.go @@ -252,667 +252,6 @@ func (m *CountNodesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_CountNodesRequest proto.InternalMessageInfo -// Deprecated: Do not use. -type GetBucketListRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetBucketListRequest) Reset() { *m = GetBucketListRequest{} } -func (m *GetBucketListRequest) String() string { return proto.CompactTextString(m) } -func (*GetBucketListRequest) ProtoMessage() {} -func (*GetBucketListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{5} -} -func (m *GetBucketListRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBucketListRequest.Unmarshal(m, b) -} -func (m *GetBucketListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBucketListRequest.Marshal(b, m, deterministic) -} -func (m *GetBucketListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBucketListRequest.Merge(m, src) -} -func (m *GetBucketListRequest) XXX_Size() int { - return xxx_messageInfo_GetBucketListRequest.Size(m) -} -func (m *GetBucketListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBucketListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBucketListRequest proto.InternalMessageInfo - -// Deprecated: Do not use. -type GetBucketListResponse struct { - Buckets []*GetBucketListResponse_Bucket `protobuf:"bytes,1,rep,name=buckets,proto3" json:"buckets,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetBucketListResponse) Reset() { *m = GetBucketListResponse{} } -func (m *GetBucketListResponse) String() string { return proto.CompactTextString(m) } -func (*GetBucketListResponse) ProtoMessage() {} -func (*GetBucketListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{6} -} -func (m *GetBucketListResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBucketListResponse.Unmarshal(m, b) -} -func (m *GetBucketListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBucketListResponse.Marshal(b, m, deterministic) -} -func (m *GetBucketListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBucketListResponse.Merge(m, src) -} -func (m *GetBucketListResponse) XXX_Size() int { - return xxx_messageInfo_GetBucketListResponse.Size(m) -} -func (m *GetBucketListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBucketListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBucketListResponse proto.InternalMessageInfo - -func (m *GetBucketListResponse) GetBuckets() []*GetBucketListResponse_Bucket { - if m != nil { - return m.Buckets - } - return nil -} - -type GetBucketListResponse_Bucket struct { - BucketId NodeID `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3,customtype=NodeID" json:"bucket_id"` - RoutingNodes []*Node `protobuf:"bytes,2,rep,name=routing_nodes,json=routingNodes,proto3" json:"routing_nodes,omitempty"` - CachedNodes []*Node `protobuf:"bytes,3,rep,name=cached_nodes,json=cachedNodes,proto3" json:"cached_nodes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetBucketListResponse_Bucket) Reset() { *m = GetBucketListResponse_Bucket{} } -func (m *GetBucketListResponse_Bucket) String() string { return proto.CompactTextString(m) } -func (*GetBucketListResponse_Bucket) ProtoMessage() {} -func (*GetBucketListResponse_Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{6, 0} -} -func (m *GetBucketListResponse_Bucket) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBucketListResponse_Bucket.Unmarshal(m, b) -} -func (m *GetBucketListResponse_Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBucketListResponse_Bucket.Marshal(b, m, deterministic) -} -func (m *GetBucketListResponse_Bucket) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBucketListResponse_Bucket.Merge(m, src) -} -func (m *GetBucketListResponse_Bucket) XXX_Size() int { - return xxx_messageInfo_GetBucketListResponse_Bucket.Size(m) -} -func (m *GetBucketListResponse_Bucket) XXX_DiscardUnknown() { - xxx_messageInfo_GetBucketListResponse_Bucket.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBucketListResponse_Bucket proto.InternalMessageInfo - -func (m *GetBucketListResponse_Bucket) GetRoutingNodes() []*Node { - if m != nil { - return m.RoutingNodes - } - return nil -} - -func (m *GetBucketListResponse_Bucket) GetCachedNodes() []*Node { - if m != nil { - return m.CachedNodes - } - return nil -} - -// GetBuckets -// -// Deprecated: Do not use. -type GetBucketsRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetBucketsRequest) Reset() { *m = GetBucketsRequest{} } -func (m *GetBucketsRequest) String() string { return proto.CompactTextString(m) } -func (*GetBucketsRequest) ProtoMessage() {} -func (*GetBucketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{7} -} -func (m *GetBucketsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBucketsRequest.Unmarshal(m, b) -} -func (m *GetBucketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBucketsRequest.Marshal(b, m, deterministic) -} -func (m *GetBucketsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBucketsRequest.Merge(m, src) -} -func (m *GetBucketsRequest) XXX_Size() int { - return xxx_messageInfo_GetBucketsRequest.Size(m) -} -func (m *GetBucketsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBucketsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBucketsRequest proto.InternalMessageInfo - -// Deprecated: Do not use. -type GetBucketsResponse struct { - Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Ids []NodeID `protobuf:"bytes,2,rep,name=ids,proto3,customtype=NodeID" json:"ids,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetBucketsResponse) Reset() { *m = GetBucketsResponse{} } -func (m *GetBucketsResponse) String() string { return proto.CompactTextString(m) } -func (*GetBucketsResponse) ProtoMessage() {} -func (*GetBucketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{8} -} -func (m *GetBucketsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBucketsResponse.Unmarshal(m, b) -} -func (m *GetBucketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBucketsResponse.Marshal(b, m, deterministic) -} -func (m *GetBucketsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBucketsResponse.Merge(m, src) -} -func (m *GetBucketsResponse) XXX_Size() int { - return xxx_messageInfo_GetBucketsResponse.Size(m) -} -func (m *GetBucketsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBucketsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBucketsResponse proto.InternalMessageInfo - -func (m *GetBucketsResponse) GetTotal() int64 { - if m != nil { - return m.Total - } - return 0 -} - -// GetBucket -// -// Deprecated: Do not use. -type GetBucketRequest struct { - Id NodeID `protobuf:"bytes,1,opt,name=id,proto3,customtype=NodeID" json:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetBucketRequest) Reset() { *m = GetBucketRequest{} } -func (m *GetBucketRequest) String() string { return proto.CompactTextString(m) } -func (*GetBucketRequest) ProtoMessage() {} -func (*GetBucketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{9} -} -func (m *GetBucketRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBucketRequest.Unmarshal(m, b) -} -func (m *GetBucketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBucketRequest.Marshal(b, m, deterministic) -} -func (m *GetBucketRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBucketRequest.Merge(m, src) -} -func (m *GetBucketRequest) XXX_Size() int { - return xxx_messageInfo_GetBucketRequest.Size(m) -} -func (m *GetBucketRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBucketRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBucketRequest proto.InternalMessageInfo - -// Deprecated: Do not use. -type GetBucketResponse struct { - Id NodeID `protobuf:"bytes,1,opt,name=id,proto3,customtype=NodeID" json:"id"` - Nodes []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetBucketResponse) Reset() { *m = GetBucketResponse{} } -func (m *GetBucketResponse) String() string { return proto.CompactTextString(m) } -func (*GetBucketResponse) ProtoMessage() {} -func (*GetBucketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{10} -} -func (m *GetBucketResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetBucketResponse.Unmarshal(m, b) -} -func (m *GetBucketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetBucketResponse.Marshal(b, m, deterministic) -} -func (m *GetBucketResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBucketResponse.Merge(m, src) -} -func (m *GetBucketResponse) XXX_Size() int { - return xxx_messageInfo_GetBucketResponse.Size(m) -} -func (m *GetBucketResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBucketResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBucketResponse proto.InternalMessageInfo - -func (m *GetBucketResponse) GetNodes() []*Node { - if m != nil { - return m.Nodes - } - return nil -} - -// Deprecated: Do not use. -type BucketList struct { - Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BucketList) Reset() { *m = BucketList{} } -func (m *BucketList) String() string { return proto.CompactTextString(m) } -func (*BucketList) ProtoMessage() {} -func (*BucketList) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{11} -} -func (m *BucketList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BucketList.Unmarshal(m, b) -} -func (m *BucketList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BucketList.Marshal(b, m, deterministic) -} -func (m *BucketList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BucketList.Merge(m, src) -} -func (m *BucketList) XXX_Size() int { - return xxx_messageInfo_BucketList.Size(m) -} -func (m *BucketList) XXX_DiscardUnknown() { - xxx_messageInfo_BucketList.DiscardUnknown(m) -} - -var xxx_messageInfo_BucketList proto.InternalMessageInfo - -func (m *BucketList) GetNodes() []*Node { - if m != nil { - return m.Nodes - } - return nil -} - -// PingNode -// -// Deprecated: Do not use. -type PingNodeRequest struct { - Id NodeID `protobuf:"bytes,1,opt,name=id,proto3,customtype=NodeID" json:"id"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PingNodeRequest) Reset() { *m = PingNodeRequest{} } -func (m *PingNodeRequest) String() string { return proto.CompactTextString(m) } -func (*PingNodeRequest) ProtoMessage() {} -func (*PingNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{12} -} -func (m *PingNodeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PingNodeRequest.Unmarshal(m, b) -} -func (m *PingNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PingNodeRequest.Marshal(b, m, deterministic) -} -func (m *PingNodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingNodeRequest.Merge(m, src) -} -func (m *PingNodeRequest) XXX_Size() int { - return xxx_messageInfo_PingNodeRequest.Size(m) -} -func (m *PingNodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PingNodeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PingNodeRequest proto.InternalMessageInfo - -func (m *PingNodeRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// Deprecated: Do not use. -type PingNodeResponse struct { - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PingNodeResponse) Reset() { *m = PingNodeResponse{} } -func (m *PingNodeResponse) String() string { return proto.CompactTextString(m) } -func (*PingNodeResponse) ProtoMessage() {} -func (*PingNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{13} -} -func (m *PingNodeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PingNodeResponse.Unmarshal(m, b) -} -func (m *PingNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PingNodeResponse.Marshal(b, m, deterministic) -} -func (m *PingNodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingNodeResponse.Merge(m, src) -} -func (m *PingNodeResponse) XXX_Size() int { - return xxx_messageInfo_PingNodeResponse.Size(m) -} -func (m *PingNodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PingNodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PingNodeResponse proto.InternalMessageInfo - -func (m *PingNodeResponse) GetOk() bool { - if m != nil { - return m.Ok - } - return false -} - -// Deprecated: Do not use. -type LookupNodeRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LookupNodeRequest) Reset() { *m = LookupNodeRequest{} } -func (m *LookupNodeRequest) String() string { return proto.CompactTextString(m) } -func (*LookupNodeRequest) ProtoMessage() {} -func (*LookupNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{14} -} -func (m *LookupNodeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LookupNodeRequest.Unmarshal(m, b) -} -func (m *LookupNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LookupNodeRequest.Marshal(b, m, deterministic) -} -func (m *LookupNodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LookupNodeRequest.Merge(m, src) -} -func (m *LookupNodeRequest) XXX_Size() int { - return xxx_messageInfo_LookupNodeRequest.Size(m) -} -func (m *LookupNodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LookupNodeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LookupNodeRequest proto.InternalMessageInfo - -func (m *LookupNodeRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *LookupNodeRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// Deprecated: Do not use. -type LookupNodeResponse struct { - Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - Meta *NodeMetadata `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LookupNodeResponse) Reset() { *m = LookupNodeResponse{} } -func (m *LookupNodeResponse) String() string { return proto.CompactTextString(m) } -func (*LookupNodeResponse) ProtoMessage() {} -func (*LookupNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{15} -} -func (m *LookupNodeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LookupNodeResponse.Unmarshal(m, b) -} -func (m *LookupNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LookupNodeResponse.Marshal(b, m, deterministic) -} -func (m *LookupNodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LookupNodeResponse.Merge(m, src) -} -func (m *LookupNodeResponse) XXX_Size() int { - return xxx_messageInfo_LookupNodeResponse.Size(m) -} -func (m *LookupNodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LookupNodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LookupNodeResponse proto.InternalMessageInfo - -func (m *LookupNodeResponse) GetNode() *Node { - if m != nil { - return m.Node - } - return nil -} - -func (m *LookupNodeResponse) GetMeta() *NodeMetadata { - if m != nil { - return m.Meta - } - return nil -} - -// Deprecated: Do not use. -type NodeInfoRequest struct { - Id NodeID `protobuf:"bytes,1,opt,name=id,proto3,customtype=NodeID" json:"id"` - Address *NodeAddress `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeInfoRequest) Reset() { *m = NodeInfoRequest{} } -func (m *NodeInfoRequest) String() string { return proto.CompactTextString(m) } -func (*NodeInfoRequest) ProtoMessage() {} -func (*NodeInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{16} -} -func (m *NodeInfoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeInfoRequest.Unmarshal(m, b) -} -func (m *NodeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeInfoRequest.Marshal(b, m, deterministic) -} -func (m *NodeInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeInfoRequest.Merge(m, src) -} -func (m *NodeInfoRequest) XXX_Size() int { - return xxx_messageInfo_NodeInfoRequest.Size(m) -} -func (m *NodeInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NodeInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeInfoRequest proto.InternalMessageInfo - -func (m *NodeInfoRequest) GetAddress() *NodeAddress { - if m != nil { - return m.Address - } - return nil -} - -// Deprecated: Do not use. -type NodeInfoResponse struct { - Type NodeType `protobuf:"varint,1,opt,name=type,proto3,enum=node.NodeType" json:"type,omitempty"` - Operator *NodeOperator `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` - Capacity *NodeCapacity `protobuf:"bytes,3,opt,name=capacity,proto3" json:"capacity,omitempty"` - Version *NodeVersion `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeInfoResponse) Reset() { *m = NodeInfoResponse{} } -func (m *NodeInfoResponse) String() string { return proto.CompactTextString(m) } -func (*NodeInfoResponse) ProtoMessage() {} -func (*NodeInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{17} -} -func (m *NodeInfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeInfoResponse.Unmarshal(m, b) -} -func (m *NodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeInfoResponse.Marshal(b, m, deterministic) -} -func (m *NodeInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeInfoResponse.Merge(m, src) -} -func (m *NodeInfoResponse) XXX_Size() int { - return xxx_messageInfo_NodeInfoResponse.Size(m) -} -func (m *NodeInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NodeInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeInfoResponse proto.InternalMessageInfo - -func (m *NodeInfoResponse) GetType() NodeType { - if m != nil { - return m.Type - } - return NodeType_INVALID -} - -func (m *NodeInfoResponse) GetOperator() *NodeOperator { - if m != nil { - return m.Operator - } - return nil -} - -func (m *NodeInfoResponse) GetCapacity() *NodeCapacity { - if m != nil { - return m.Capacity - } - return nil -} - -func (m *NodeInfoResponse) GetVersion() *NodeVersion { - if m != nil { - return m.Version - } - return nil -} - -// Deprecated: Do not use. -type FindNearRequest struct { - Id NodeID `protobuf:"bytes,1,opt,name=id,proto3,customtype=NodeID" json:"id"` - Start NodeID `protobuf:"bytes,2,opt,name=start,proto3,customtype=NodeID" json:"start"` - Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FindNearRequest) Reset() { *m = FindNearRequest{} } -func (m *FindNearRequest) String() string { return proto.CompactTextString(m) } -func (*FindNearRequest) ProtoMessage() {} -func (*FindNearRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{18} -} -func (m *FindNearRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FindNearRequest.Unmarshal(m, b) -} -func (m *FindNearRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FindNearRequest.Marshal(b, m, deterministic) -} -func (m *FindNearRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FindNearRequest.Merge(m, src) -} -func (m *FindNearRequest) XXX_Size() int { - return xxx_messageInfo_FindNearRequest.Size(m) -} -func (m *FindNearRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FindNearRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FindNearRequest proto.InternalMessageInfo - -func (m *FindNearRequest) GetLimit() int64 { - if m != nil { - return m.Limit - } - return 0 -} - -// Deprecated: Do not use. -type FindNearResponse struct { - Nodes []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FindNearResponse) Reset() { *m = FindNearResponse{} } -func (m *FindNearResponse) String() string { return proto.CompactTextString(m) } -func (*FindNearResponse) ProtoMessage() {} -func (*FindNearResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{19} -} -func (m *FindNearResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FindNearResponse.Unmarshal(m, b) -} -func (m *FindNearResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FindNearResponse.Marshal(b, m, deterministic) -} -func (m *FindNearResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FindNearResponse.Merge(m, src) -} -func (m *FindNearResponse) XXX_Size() int { - return xxx_messageInfo_FindNearResponse.Size(m) -} -func (m *FindNearResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FindNearResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FindNearResponse proto.InternalMessageInfo - -func (m *FindNearResponse) GetNodes() []*Node { - if m != nil { - return m.Nodes - } - return nil -} - type DumpNodesRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -923,7 +262,7 @@ func (m *DumpNodesRequest) Reset() { *m = DumpNodesRequest{} } func (m *DumpNodesRequest) String() string { return proto.CompactTextString(m) } func (*DumpNodesRequest) ProtoMessage() {} func (*DumpNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{20} + return fileDescriptor_a07d9034b2dd9d26, []int{5} } func (m *DumpNodesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DumpNodesRequest.Unmarshal(m, b) @@ -954,7 +293,7 @@ func (m *DumpNodesResponse) Reset() { *m = DumpNodesResponse{} } func (m *DumpNodesResponse) String() string { return proto.CompactTextString(m) } func (*DumpNodesResponse) ProtoMessage() {} func (*DumpNodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{21} + return fileDescriptor_a07d9034b2dd9d26, []int{6} } func (m *DumpNodesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DumpNodesResponse.Unmarshal(m, b) @@ -991,7 +330,7 @@ func (m *StatsRequest) Reset() { *m = StatsRequest{} } func (m *StatsRequest) String() string { return proto.CompactTextString(m) } func (*StatsRequest) ProtoMessage() {} func (*StatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{22} + return fileDescriptor_a07d9034b2dd9d26, []int{7} } func (m *StatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StatsRequest.Unmarshal(m, b) @@ -1027,7 +366,7 @@ func (m *StatSummaryResponse) Reset() { *m = StatSummaryResponse{} } func (m *StatSummaryResponse) String() string { return proto.CompactTextString(m) } func (*StatSummaryResponse) ProtoMessage() {} func (*StatSummaryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{23} + return fileDescriptor_a07d9034b2dd9d26, []int{8} } func (m *StatSummaryResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StatSummaryResponse.Unmarshal(m, b) @@ -1099,7 +438,7 @@ func (m *DashboardRequest) Reset() { *m = DashboardRequest{} } func (m *DashboardRequest) String() string { return proto.CompactTextString(m) } func (*DashboardRequest) ProtoMessage() {} func (*DashboardRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{24} + return fileDescriptor_a07d9034b2dd9d26, []int{9} } func (m *DashboardRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DashboardRequest.Unmarshal(m, b) @@ -1141,7 +480,7 @@ func (m *DashboardResponse) Reset() { *m = DashboardResponse{} } func (m *DashboardResponse) String() string { return proto.CompactTextString(m) } func (*DashboardResponse) ProtoMessage() {} func (*DashboardResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{25} + return fileDescriptor_a07d9034b2dd9d26, []int{10} } func (m *DashboardResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DashboardResponse.Unmarshal(m, b) @@ -1246,7 +585,7 @@ func (m *SegmentHealthRequest) Reset() { *m = SegmentHealthRequest{} } func (m *SegmentHealthRequest) String() string { return proto.CompactTextString(m) } func (*SegmentHealthRequest) ProtoMessage() {} func (*SegmentHealthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{26} + return fileDescriptor_a07d9034b2dd9d26, []int{11} } func (m *SegmentHealthRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SegmentHealthRequest.Unmarshal(m, b) @@ -1308,7 +647,7 @@ func (m *SegmentHealth) Reset() { *m = SegmentHealth{} } func (m *SegmentHealth) String() string { return proto.CompactTextString(m) } func (*SegmentHealth) ProtoMessage() {} func (*SegmentHealth) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{27} + return fileDescriptor_a07d9034b2dd9d26, []int{12} } func (m *SegmentHealth) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SegmentHealth.Unmarshal(m, b) @@ -1347,7 +686,7 @@ func (m *SegmentHealthResponse) Reset() { *m = SegmentHealthResponse{} } func (m *SegmentHealthResponse) String() string { return proto.CompactTextString(m) } func (*SegmentHealthResponse) ProtoMessage() {} func (*SegmentHealthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{28} + return fileDescriptor_a07d9034b2dd9d26, []int{13} } func (m *SegmentHealthResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SegmentHealthResponse.Unmarshal(m, b) @@ -1397,7 +736,7 @@ func (m *ObjectHealthRequest) Reset() { *m = ObjectHealthRequest{} } func (m *ObjectHealthRequest) String() string { return proto.CompactTextString(m) } func (*ObjectHealthRequest) ProtoMessage() {} func (*ObjectHealthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{29} + return fileDescriptor_a07d9034b2dd9d26, []int{14} } func (m *ObjectHealthRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ObjectHealthRequest.Unmarshal(m, b) @@ -1471,7 +810,7 @@ func (m *ObjectHealthResponse) Reset() { *m = ObjectHealthResponse{} } func (m *ObjectHealthResponse) String() string { return proto.CompactTextString(m) } func (*ObjectHealthResponse) ProtoMessage() {} func (*ObjectHealthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a07d9034b2dd9d26, []int{30} + return fileDescriptor_a07d9034b2dd9d26, []int{15} } func (m *ObjectHealthResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ObjectHealthResponse.Unmarshal(m, b) @@ -1511,22 +850,6 @@ func init() { proto.RegisterType((*ListIrreparableSegmentsResponse)(nil), "inspector.ListIrreparableSegmentsResponse") proto.RegisterType((*CountNodesResponse)(nil), "inspector.CountNodesResponse") proto.RegisterType((*CountNodesRequest)(nil), "inspector.CountNodesRequest") - proto.RegisterType((*GetBucketListRequest)(nil), "inspector.GetBucketListRequest") - proto.RegisterType((*GetBucketListResponse)(nil), "inspector.GetBucketListResponse") - proto.RegisterType((*GetBucketListResponse_Bucket)(nil), "inspector.GetBucketListResponse.Bucket") - proto.RegisterType((*GetBucketsRequest)(nil), "inspector.GetBucketsRequest") - proto.RegisterType((*GetBucketsResponse)(nil), "inspector.GetBucketsResponse") - proto.RegisterType((*GetBucketRequest)(nil), "inspector.GetBucketRequest") - proto.RegisterType((*GetBucketResponse)(nil), "inspector.GetBucketResponse") - proto.RegisterType((*BucketList)(nil), "inspector.BucketList") - proto.RegisterType((*PingNodeRequest)(nil), "inspector.PingNodeRequest") - proto.RegisterType((*PingNodeResponse)(nil), "inspector.PingNodeResponse") - proto.RegisterType((*LookupNodeRequest)(nil), "inspector.LookupNodeRequest") - proto.RegisterType((*LookupNodeResponse)(nil), "inspector.LookupNodeResponse") - proto.RegisterType((*NodeInfoRequest)(nil), "inspector.NodeInfoRequest") - proto.RegisterType((*NodeInfoResponse)(nil), "inspector.NodeInfoResponse") - proto.RegisterType((*FindNearRequest)(nil), "inspector.FindNearRequest") - proto.RegisterType((*FindNearResponse)(nil), "inspector.FindNearResponse") proto.RegisterType((*DumpNodesRequest)(nil), "inspector.DumpNodesRequest") proto.RegisterType((*DumpNodesResponse)(nil), "inspector.DumpNodesResponse") proto.RegisterType((*StatsRequest)(nil), "inspector.StatsRequest") @@ -1543,416 +866,86 @@ func init() { func init() { proto.RegisterFile("inspector.proto", fileDescriptor_a07d9034b2dd9d26) } var fileDescriptor_a07d9034b2dd9d26 = []byte{ - // 1751 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x93, 0x23, 0x47, - 0x11, 0xde, 0xd6, 0x6b, 0xa4, 0x94, 0x46, 0x8f, 0x9a, 0xb1, 0xb7, 0x91, 0x77, 0x57, 0x43, 0x03, - 0xde, 0xb5, 0x07, 0x34, 0x46, 0xb6, 0x09, 0x0c, 0xa7, 0xd1, 0xac, 0xd7, 0x56, 0xb0, 0x78, 0xc7, - 0x3d, 0x1b, 0x44, 0x40, 0x10, 0xd1, 0x94, 0xd4, 0x35, 0x33, 0xcd, 0x48, 0x5d, 0xbd, 0xdd, 0xa5, - 0xc5, 0xba, 0x71, 0x22, 0xe0, 0x04, 0x17, 0x0e, 0x9c, 0x09, 0xfe, 0x01, 0x27, 0xfe, 0x00, 0xfc, - 0x06, 0x0e, 0xe6, 0x06, 0xff, 0x80, 0x08, 0x6e, 0x44, 0x65, 0x55, 0x57, 0x77, 0xeb, 0xe1, 0x1d, - 0x02, 0xb8, 0xa9, 0x33, 0xbf, 0x7c, 0xd6, 0x23, 0xbf, 0x12, 0x74, 0x82, 0x30, 0x89, 0xd8, 0x4c, - 0xf0, 0x78, 0x18, 0xc5, 0x5c, 0x70, 0xd2, 0x30, 0x82, 0x3e, 0x5c, 0xf1, 0x2b, 0xae, 0xc4, 0x7d, - 0x08, 0xb9, 0xcf, 0xf4, 0xef, 0x4e, 0xc4, 0x83, 0x50, 0xb0, 0xd8, 0x9f, 0x6a, 0xc1, 0x83, 0x2b, - 0xce, 0xaf, 0xe6, 0xec, 0x04, 0xbf, 0xa6, 0xcb, 0xcb, 0x13, 0x7f, 0x19, 0x53, 0x11, 0xf0, 0x50, - 0xeb, 0x07, 0xeb, 0x7a, 0x11, 0x2c, 0x58, 0x22, 0xe8, 0x22, 0x52, 0x00, 0xe7, 0x06, 0x1e, 0x3c, - 0x0d, 0x12, 0x31, 0x89, 0x63, 0x16, 0xd1, 0x98, 0x4e, 0xe7, 0xec, 0x82, 0x5d, 0x2d, 0x58, 0x28, - 0x12, 0x97, 0xbd, 0x58, 0xb2, 0x44, 0x90, 0x43, 0xa8, 0xce, 0x83, 0x45, 0x20, 0x6c, 0xeb, 0xc8, - 0x7a, 0x54, 0x75, 0xd5, 0x07, 0x79, 0x17, 0x5e, 0x9f, 0xd3, 0x44, 0x78, 0x09, 0x63, 0xa1, 0x97, - 0x28, 0x13, 0x2f, 0xa2, 0xe2, 0xda, 0x2e, 0x1d, 0x59, 0x8f, 0x5a, 0xee, 0x81, 0xd4, 0x5e, 0x30, - 0x16, 0x6a, 0x77, 0xe7, 0x54, 0x5c, 0x3b, 0x7f, 0xb7, 0x80, 0x6c, 0x46, 0x22, 0x04, 0x2a, 0x68, - 0x69, 0xa1, 0x25, 0xfe, 0x26, 0x1f, 0x40, 0x3b, 0xf5, 0xea, 0x33, 0x41, 0x83, 0x39, 0xfa, 0x6d, - 0x8e, 0xc8, 0x30, 0x6b, 0xc1, 0xb9, 0xfa, 0xe5, 0xee, 0x6b, 0xe4, 0x63, 0x04, 0x92, 0x01, 0x34, - 0xe7, 0x3c, 0x11, 0x5e, 0x14, 0xb0, 0x19, 0x4b, 0xec, 0x32, 0xa6, 0x0d, 0x52, 0x74, 0x8e, 0x12, - 0x32, 0x04, 0xcc, 0xce, 0x93, 0x89, 0x04, 0xb1, 0x47, 0x85, 0x60, 0x8b, 0x48, 0xd8, 0x95, 0x23, - 0xeb, 0x51, 0xd9, 0xed, 0x49, 0x95, 0x8b, 0x9a, 0x53, 0xa5, 0x20, 0xef, 0xc0, 0x61, 0x11, 0xea, - 0xcd, 0xf8, 0x32, 0x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x82, 0xdf, 0xc3, 0x23, - 0x20, 0x12, 0x7b, 0x0f, 0x0f, 0xd9, 0x83, 0xdc, 0x30, 0xde, 0xb2, 0x89, 0x5c, 0x05, 0x26, 0xdf, - 0x84, 0xda, 0x32, 0x92, 0x24, 0xd0, 0xae, 0xa3, 0xd9, 0x97, 0x86, 0x8a, 0x21, 0x0e, 0x53, 0x86, - 0x38, 0x7c, 0xac, 0x19, 0xa4, 0xab, 0x81, 0xe4, 0x43, 0x68, 0x22, 0x5d, 0x8a, 0x82, 0xf0, 0x8a, - 0xf9, 0x76, 0x03, 0xed, 0xfa, 0x1b, 0x76, 0xcf, 0x53, 0x66, 0x39, 0xae, 0xcb, 0x05, 0xf9, 0xcd, - 0xdf, 0x06, 0x96, 0x0b, 0xd2, 0xf0, 0x1c, 0xed, 0xc8, 0x47, 0xd0, 0x42, 0x37, 0x2f, 0x96, 0x2c, - 0x0e, 0x98, 0x6f, 0xc3, 0x7f, 0xe0, 0x07, 0x13, 0xf8, 0x54, 0x19, 0x92, 0xf7, 0xa1, 0x67, 0xf2, - 0xf1, 0x2e, 0x63, 0xbe, 0x90, 0x5b, 0xa1, 0x89, 0x5b, 0x21, 0x3f, 0x71, 0xdb, 0x69, 0xec, 0x27, - 0x31, 0x5f, 0x4c, 0x7c, 0xc3, 0x58, 0x33, 0xb3, 0xb4, 0xc3, 0x2d, 0xec, 0xf0, 0x41, 0x1e, 0xaf, - 0x9b, 0xec, 0xfc, 0xce, 0x82, 0x43, 0x4d, 0xc0, 0x3e, 0x66, 0x74, 0x2e, 0xae, 0xd3, 0x0b, 0xea, - 0x75, 0xa8, 0x29, 0x76, 0xa2, 0x59, 0xab, 0xfe, 0x92, 0xe7, 0x83, 0x85, 0xb3, 0x78, 0x15, 0x09, - 0xe6, 0xe7, 0xf9, 0xf0, 0xbe, 0x91, 0x4a, 0x26, 0x4c, 0xbe, 0x02, 0x29, 0x69, 0xf5, 0x82, 0xd0, - 0x67, 0x9f, 0xe9, 0xb3, 0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x7e, 0x6f, 0xc1, 0x01, - 0xfe, 0x83, 0x70, 0x21, 0x78, 0xcc, 0xb2, 0x54, 0xc7, 0x50, 0x45, 0x1a, 0x47, 0xee, 0xae, 0x8d, - 0x60, 0xe3, 0xf7, 0x15, 0xb3, 0xd9, 0xb9, 0x43, 0x3e, 0x86, 0x86, 0x61, 0x3a, 0xc5, 0x1c, 0xd7, - 0x48, 0x51, 0x31, 0xc7, 0x75, 0x72, 0xe4, 0xdc, 0x19, 0xfd, 0xd2, 0x82, 0xc3, 0xdc, 0xbf, 0x07, - 0x59, 0x9a, 0x11, 0xdc, 0xdd, 0xf1, 0x9f, 0x04, 0x79, 0x2b, 0xbf, 0x8d, 0xbf, 0xf0, 0xdf, 0xa0, - 0xfe, 0xdb, 0xb7, 0x81, 0xea, 0x86, 0xfd, 0xc9, 0x82, 0x8e, 0xba, 0x3c, 0xb2, 0x2c, 0x3e, 0x85, - 0x56, 0xfe, 0x26, 0x22, 0xf9, 0xd6, 0x6c, 0xb9, 0x8c, 0xfb, 0x83, 0x9d, 0x7a, 0xd3, 0xbb, 0xe7, - 0xeb, 0x63, 0x70, 0xb0, 0xf3, 0x0e, 0xdb, 0xb2, 0x27, 0xb7, 0x8e, 0x22, 0xe7, 0xce, 0xb8, 0xf2, - 0xa3, 0x52, 0x34, 0x9d, 0xd6, 0x90, 0x96, 0xbc, 0xfb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x11, - 0x24, 0x22, 0x66, 0xad, 0x13, 0x00, 0x00, -} - -type DRPCKadInspectorClient interface { - DRPCConn() drpc.Conn - - // CountNodes returns the number of nodes in the routing table - CountNodes(ctx context.Context, in *CountNodesRequest) (*CountNodesResponse, error) - // PingNode sends a PING RPC to a node and returns its availability - PingNode(ctx context.Context, in *PingNodeRequest) (*PingNodeResponse, error) - // LookupNode triggers a Kademlia FindNode and returns the response - LookupNode(ctx context.Context, in *LookupNodeRequest) (*LookupNodeResponse, error) - // NodeInfo sends a PING RPC to a node and returns its local info - NodeInfo(ctx context.Context, in *NodeInfoRequest) (*NodeInfoResponse, error) - // FindNear returns limit number of IDs "near" the Start ID - FindNear(ctx context.Context, in *FindNearRequest) (*FindNearResponse, error) - // DumpNodes returns all the nodes in the node database - DumpNodes(ctx context.Context, in *DumpNodesRequest) (*DumpNodesResponse, error) - // GetBucketList returns all the buckets with all their nodes - GetBucketList(ctx context.Context, in *GetBucketListRequest) (*GetBucketListResponse, error) -} - -type drpcKadInspectorClient struct { - cc drpc.Conn -} - -func NewDRPCKadInspectorClient(cc drpc.Conn) DRPCKadInspectorClient { - return &drpcKadInspectorClient{cc} -} - -func (c *drpcKadInspectorClient) DRPCConn() drpc.Conn { return c.cc } - -func (c *drpcKadInspectorClient) CountNodes(ctx context.Context, in *CountNodesRequest) (*CountNodesResponse, error) { - out := new(CountNodesResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/CountNodes", in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcKadInspectorClient) PingNode(ctx context.Context, in *PingNodeRequest) (*PingNodeResponse, error) { - out := new(PingNodeResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/PingNode", in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcKadInspectorClient) LookupNode(ctx context.Context, in *LookupNodeRequest) (*LookupNodeResponse, error) { - out := new(LookupNodeResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/LookupNode", in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcKadInspectorClient) NodeInfo(ctx context.Context, in *NodeInfoRequest) (*NodeInfoResponse, error) { - out := new(NodeInfoResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/NodeInfo", in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcKadInspectorClient) FindNear(ctx context.Context, in *FindNearRequest) (*FindNearResponse, error) { - out := new(FindNearResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/FindNear", in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcKadInspectorClient) DumpNodes(ctx context.Context, in *DumpNodesRequest) (*DumpNodesResponse, error) { - out := new(DumpNodesResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/DumpNodes", in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcKadInspectorClient) GetBucketList(ctx context.Context, in *GetBucketListRequest) (*GetBucketListResponse, error) { - out := new(GetBucketListResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/GetBucketList", in, out) - if err != nil { - return nil, err - } - return out, nil -} - -type DRPCKadInspectorServer interface { - // CountNodes returns the number of nodes in the routing table - CountNodes(context.Context, *CountNodesRequest) (*CountNodesResponse, error) - // PingNode sends a PING RPC to a node and returns its availability - PingNode(context.Context, *PingNodeRequest) (*PingNodeResponse, error) - // LookupNode triggers a Kademlia FindNode and returns the response - LookupNode(context.Context, *LookupNodeRequest) (*LookupNodeResponse, error) - // NodeInfo sends a PING RPC to a node and returns its local info - NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoResponse, error) - // FindNear returns limit number of IDs "near" the Start ID - FindNear(context.Context, *FindNearRequest) (*FindNearResponse, error) - // DumpNodes returns all the nodes in the node database - DumpNodes(context.Context, *DumpNodesRequest) (*DumpNodesResponse, error) - // GetBucketList returns all the buckets with all their nodes - GetBucketList(context.Context, *GetBucketListRequest) (*GetBucketListResponse, error) -} - -type DRPCKadInspectorDescription struct{} - -func (DRPCKadInspectorDescription) NumMethods() int { return 7 } - -func (DRPCKadInspectorDescription) Method(n int) (string, drpc.Handler, interface{}, bool) { - switch n { - case 0: - return "/inspector.KadInspector/CountNodes", - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCKadInspectorServer). - CountNodes( - ctx, - in1.(*CountNodesRequest), - ) - }, DRPCKadInspectorServer.CountNodes, true - case 1: - return "/inspector.KadInspector/PingNode", - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCKadInspectorServer). - PingNode( - ctx, - in1.(*PingNodeRequest), - ) - }, DRPCKadInspectorServer.PingNode, true - case 2: - return "/inspector.KadInspector/LookupNode", - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCKadInspectorServer). - LookupNode( - ctx, - in1.(*LookupNodeRequest), - ) - }, DRPCKadInspectorServer.LookupNode, true - case 3: - return "/inspector.KadInspector/NodeInfo", - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCKadInspectorServer). - NodeInfo( - ctx, - in1.(*NodeInfoRequest), - ) - }, DRPCKadInspectorServer.NodeInfo, true - case 4: - return "/inspector.KadInspector/FindNear", - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCKadInspectorServer). - FindNear( - ctx, - in1.(*FindNearRequest), - ) - }, DRPCKadInspectorServer.FindNear, true - case 5: - return "/inspector.KadInspector/DumpNodes", - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCKadInspectorServer). - DumpNodes( - ctx, - in1.(*DumpNodesRequest), - ) - }, DRPCKadInspectorServer.DumpNodes, true - case 6: - return "/inspector.KadInspector/GetBucketList", - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCKadInspectorServer). - GetBucketList( - ctx, - in1.(*GetBucketListRequest), - ) - }, DRPCKadInspectorServer.GetBucketList, true - default: - return "", nil, nil, false - } -} - -func DRPCRegisterKadInspector(srv drpc.Server, impl DRPCKadInspectorServer) { - srv.Register(impl, DRPCKadInspectorDescription{}) -} - -type DRPCKadInspector_CountNodesStream interface { - drpc.Stream - SendAndClose(*CountNodesResponse) error -} - -type drpcKadInspectorCountNodesStream struct { - drpc.Stream -} - -func (x *drpcKadInspectorCountNodesStream) SendAndClose(m *CountNodesResponse) error { - if err := x.MsgSend(m); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCKadInspector_PingNodeStream interface { - drpc.Stream - SendAndClose(*PingNodeResponse) error -} - -type drpcKadInspectorPingNodeStream struct { - drpc.Stream -} - -func (x *drpcKadInspectorPingNodeStream) SendAndClose(m *PingNodeResponse) error { - if err := x.MsgSend(m); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCKadInspector_LookupNodeStream interface { - drpc.Stream - SendAndClose(*LookupNodeResponse) error -} - -type drpcKadInspectorLookupNodeStream struct { - drpc.Stream -} - -func (x *drpcKadInspectorLookupNodeStream) SendAndClose(m *LookupNodeResponse) error { - if err := x.MsgSend(m); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCKadInspector_NodeInfoStream interface { - drpc.Stream - SendAndClose(*NodeInfoResponse) error -} - -type drpcKadInspectorNodeInfoStream struct { - drpc.Stream -} - -func (x *drpcKadInspectorNodeInfoStream) SendAndClose(m *NodeInfoResponse) error { - if err := x.MsgSend(m); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCKadInspector_FindNearStream interface { - drpc.Stream - SendAndClose(*FindNearResponse) error -} - -type drpcKadInspectorFindNearStream struct { - drpc.Stream -} - -func (x *drpcKadInspectorFindNearStream) SendAndClose(m *FindNearResponse) error { - if err := x.MsgSend(m); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCKadInspector_DumpNodesStream interface { - drpc.Stream - SendAndClose(*DumpNodesResponse) error -} - -type drpcKadInspectorDumpNodesStream struct { - drpc.Stream -} - -func (x *drpcKadInspectorDumpNodesStream) SendAndClose(m *DumpNodesResponse) error { - if err := x.MsgSend(m); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCKadInspector_GetBucketListStream interface { - drpc.Stream - SendAndClose(*GetBucketListResponse) error -} - -type drpcKadInspectorGetBucketListStream struct { - drpc.Stream -} - -func (x *drpcKadInspectorGetBucketListStream) SendAndClose(m *GetBucketListResponse) error { - if err := x.MsgSend(m); err != nil { - return err - } - return x.CloseSend() + // 1253 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00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 0x04, 0x3a, + 0x80, 0xf2, 0x3c, 0x5c, 0x84, 0xc2, 0x75, 0x3a, 0xce, 0x61, 0xd9, 0xd7, 0x2f, 0xe8, 0x1e, 0x5c, + 0x9e, 0xe3, 0x44, 0x04, 0x09, 0xa5, 0x51, 0x90, 0x68, 0x97, 0x20, 0xc6, 0x62, 0xe6, 0x6e, 0x75, + 0x9c, 0xc3, 0xba, 0xdf, 0x94, 0xd6, 0x21, 0xa5, 0x91, 0x09, 0x77, 0x8a, 0xc5, 0xcc, 0xfb, 0xcd, + 0x01, 0xb4, 0xfe, 0x25, 0x84, 0x60, 0x5b, 0x79, 0x3a, 0xca, 0x53, 0x3d, 0xa3, 0x87, 0xb0, 0x9b, + 0x45, 0x25, 0x54, 0xe0, 0x70, 0xae, 0xe2, 0xd6, 0x7a, 0xa8, 0x9b, 0x4b, 0x70, 0xaa, 0x9f, 0xfc, + 0x1d, 0xc3, 0x3c, 0x51, 0x44, 0xd4, 0x86, 0xda, 0x9c, 0x25, 0x22, 0x88, 0x43, 0x3a, 0xa6, 0x89, + 0x5b, 0x52, 0x69, 0x83, 0x84, 0x4e, 0x15, 0x82, 0xba, 0xa0, 0xb2, 0x0b, 0x64, 0x22, 0x21, 0x0f, + 0xb0, 0x10, 0x74, 0x11, 0x0b, 0x77, 0xbb, 0xe3, 0x1c, 0x96, 0xfc, 0x86, 0x34, 0xf9, 0xca, 0x72, + 0xac, 0x0d, 0xe8, 0x2e, 0x1c, 0x2c, 0x53, 0x83, 0x31, 0x4b, 0x23, 0xe1, 0x96, 0x95, 0x03, 0xe2, + 0x45, 0xf2, 0x23, 0x69, 0xf1, 0x3e, 0x83, 0xf6, 0x46, 0x55, 0x93, 0x98, 0x45, 0x09, 0x45, 0x0f, + 0xe1, 0x92, 0x49, 0x3b, 0x71, 0x9d, 0x4e, 0xe9, 0xb0, 0xd6, 0xbb, 0xde, 0xcd, 0x3b, 0x62, 0xdd, + 0xd3, 0xb7, 0x74, 0xef, 0x36, 0x20,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, 0xd0, 0x47, 0x50, 0x57, 0x61, 0x5e, 0xa5, 0x94, 0x87, 0x94, 0xb8, 0xf0, 0x2f, 0xe2, 0xa8, + 0x04, 0x9e, 0x6b, 0x47, 0xf4, 0x00, 0x1a, 0x36, 0x9f, 0x60, 0xc2, 0xd9, 0x42, 0xb6, 0x42, 0x4d, + 0xb5, 0x02, 0x14, 0xda, 0x60, 0x37, 0xfb, 0xf6, 0x13, 0xce, 0x16, 0x03, 0x62, 0xa7, 0x6e, 0xee, + 0x96, 0x29, 0x5c, 0x57, 0x0a, 0x37, 0x8b, 0x7c, 0x23, 0xb2, 0xf7, 0x9d, 0x03, 0x07, 0x66, 0x88, + 0x3c, 0xa5, 0x78, 0x2e, 0x66, 0xd9, 0x64, 0xbf, 0x0c, 0x95, 0x51, 0x3a, 0x7e, 0x49, 0x85, 0x99, + 0xbc, 0xe6, 0x4d, 0x9e, 0x0f, 0x1a, 0x8d, 0xf9, 0x59, 0x2c, 0x28, 0x29, 0xce, 0xf4, 0x1d, 0x8b, + 0xca, 0x69, 0x8e, 0xde, 0x85, 0x6c, 0xf0, 0x06, 0x61, 0x44, 0xe8, 0x1b, 0x73, 0x16, 0xeb, 0x06, + 0x1c, 0x48, 0x4c, 0x9e, 0xfb, 0x98, 0xb3, 0xcf, 0xe9, 0x58, 0xc8, 0x3f, 0xdc, 0x56, 0x71, 0xaa, + 0x06, 0x19, 0x10, 0xef, 0x47, 0x07, 0x76, 0x96, 0x72, 0x43, 0x77, 0xa0, 0x36, 0x53, 0x4f, 0x67, + 0x41, 0x48, 0xf4, 0xe0, 0x59, 0xd6, 0x04, 0x8c, 0x79, 0x40, 0x64, 0xcf, 0xef, 0xa4, 0x51, 0x91, + 0xbe, 0xb5, 0x46, 0xaf, 0x5b, 0x82, 0x74, 0xb8, 0x03, 0x35, 0x36, 0x99, 0xcc, 0xc3, 0x88, 0x2a, + 0x7a, 0x69, 0x3d, 0xba, 0x31, 0x4b, 0xb2, 0x0b, 0x17, 0xcd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55, + 0xbb, 0x8b, 0xd1, 0xd5, 0x02, 0x77, 0x75, 0x6b, 0xb7, 0xae, 0x9d, 0x6f, 0xd4, 0x71, 0x7a, 0xdf, + 0x3b, 0xd0, 0x54, 0x77, 0x9e, 0xa1, 0x60, 0x9c, 0xe6, 0xa9, 0xf6, 0xa1, 0xac, 0x96, 0x36, 0xba, + 0xb2, 0x32, 0x70, 0x6d, 0xdc, 0xbf, 0x99, 0xc4, 0xde, 0x05, 0xf4, 0x14, 0xaa, 0x76, 0xaf, 0x2d, + 0xe7, 0xb8, 0xb2, 0x02, 0x97, 0x73, 0x5c, 0x5d, 0x85, 0xde, 0x85, 0xde, 0xd7, 0x0e, 0x1c, 0x14, + 0xee, 0x3b, 0x79, 0x9a, 0x31, 0x5c, 0xd9, 0x70, 0x8b, 0x42, 0xb7, 0x0a, 0x31, 0xff, 0xfa, 0xfe, + 0xda, 0xba, 0xfd, 0x4f, 0xa8, 0x46, 0xb0, 0x9f, 0x1c, 0xd8, 0xd3, 0xad, 0x92, 0x67, 0xf1, 0x1c, + 0xea, 0xc5, 0xbe, 0x43, 0x45, 0x69, 0xce, 0x39, 0x7a, 0xad, 0xf6, 0x46, 0xbb, 0xd5, 0xee, 0xc5, + 0xea, 0xd0, 0x6b, 0x6f, 0xec, 0x58, 0x13, 0xb4, 0xb3, 0x99, 0x90, 0x45, 0xed, 0x6f, 0x7f, 0xba, + 0x15, 0x8f, 0x46, 0x15, 0xb5, 0x84, 0xee, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0x43, 0xa8, 0x95, + 0x12, 0x5f, 0x0c, 0x00, 0x00, } type DRPCOverlayInspectorClient interface { @@ -2361,282 +1354,6 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// KadInspectorClient is the client API for KadInspector service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KadInspectorClient interface { - // CountNodes returns the number of nodes in the routing table - CountNodes(ctx context.Context, in *CountNodesRequest, opts ...grpc.CallOption) (*CountNodesResponse, error) - // PingNode sends a PING RPC to a node and returns its availability - PingNode(ctx context.Context, in *PingNodeRequest, opts ...grpc.CallOption) (*PingNodeResponse, error) - // LookupNode triggers a Kademlia FindNode and returns the response - LookupNode(ctx context.Context, in *LookupNodeRequest, opts ...grpc.CallOption) (*LookupNodeResponse, error) - // NodeInfo sends a PING RPC to a node and returns its local info - NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) - // FindNear returns limit number of IDs "near" the Start ID - FindNear(ctx context.Context, in *FindNearRequest, opts ...grpc.CallOption) (*FindNearResponse, error) - // DumpNodes returns all the nodes in the node database - DumpNodes(ctx context.Context, in *DumpNodesRequest, opts ...grpc.CallOption) (*DumpNodesResponse, error) - // GetBucketList returns all the buckets with all their nodes - GetBucketList(ctx context.Context, in *GetBucketListRequest, opts ...grpc.CallOption) (*GetBucketListResponse, error) -} - -type kadInspectorClient struct { - cc *grpc.ClientConn -} - -func NewKadInspectorClient(cc *grpc.ClientConn) KadInspectorClient { - return &kadInspectorClient{cc} -} - -func (c *kadInspectorClient) CountNodes(ctx context.Context, in *CountNodesRequest, opts ...grpc.CallOption) (*CountNodesResponse, error) { - out := new(CountNodesResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/CountNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kadInspectorClient) PingNode(ctx context.Context, in *PingNodeRequest, opts ...grpc.CallOption) (*PingNodeResponse, error) { - out := new(PingNodeResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/PingNode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kadInspectorClient) LookupNode(ctx context.Context, in *LookupNodeRequest, opts ...grpc.CallOption) (*LookupNodeResponse, error) { - out := new(LookupNodeResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/LookupNode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kadInspectorClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) { - out := new(NodeInfoResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/NodeInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kadInspectorClient) FindNear(ctx context.Context, in *FindNearRequest, opts ...grpc.CallOption) (*FindNearResponse, error) { - out := new(FindNearResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/FindNear", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kadInspectorClient) DumpNodes(ctx context.Context, in *DumpNodesRequest, opts ...grpc.CallOption) (*DumpNodesResponse, error) { - out := new(DumpNodesResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/DumpNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kadInspectorClient) GetBucketList(ctx context.Context, in *GetBucketListRequest, opts ...grpc.CallOption) (*GetBucketListResponse, error) { - out := new(GetBucketListResponse) - err := c.cc.Invoke(ctx, "/inspector.KadInspector/GetBucketList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KadInspectorServer is the server API for KadInspector service. -type KadInspectorServer interface { - // CountNodes returns the number of nodes in the routing table - CountNodes(context.Context, *CountNodesRequest) (*CountNodesResponse, error) - // PingNode sends a PING RPC to a node and returns its availability - PingNode(context.Context, *PingNodeRequest) (*PingNodeResponse, error) - // LookupNode triggers a Kademlia FindNode and returns the response - LookupNode(context.Context, *LookupNodeRequest) (*LookupNodeResponse, error) - // NodeInfo sends a PING RPC to a node and returns its local info - NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoResponse, error) - // FindNear returns limit number of IDs "near" the Start ID - FindNear(context.Context, *FindNearRequest) (*FindNearResponse, error) - // DumpNodes returns all the nodes in the node database - DumpNodes(context.Context, *DumpNodesRequest) (*DumpNodesResponse, error) - // GetBucketList returns all the buckets with all their nodes - GetBucketList(context.Context, *GetBucketListRequest) (*GetBucketListResponse, error) -} - -func RegisterKadInspectorServer(s *grpc.Server, srv KadInspectorServer) { - s.RegisterService(&_KadInspector_serviceDesc, srv) -} - -func _KadInspector_CountNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CountNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KadInspectorServer).CountNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/inspector.KadInspector/CountNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KadInspectorServer).CountNodes(ctx, req.(*CountNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KadInspector_PingNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KadInspectorServer).PingNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/inspector.KadInspector/PingNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KadInspectorServer).PingNode(ctx, req.(*PingNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KadInspector_LookupNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LookupNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KadInspectorServer).LookupNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/inspector.KadInspector/LookupNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KadInspectorServer).LookupNode(ctx, req.(*LookupNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KadInspector_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KadInspectorServer).NodeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/inspector.KadInspector/NodeInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KadInspectorServer).NodeInfo(ctx, req.(*NodeInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KadInspector_FindNear_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindNearRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KadInspectorServer).FindNear(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/inspector.KadInspector/FindNear", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KadInspectorServer).FindNear(ctx, req.(*FindNearRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KadInspector_DumpNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DumpNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KadInspectorServer).DumpNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/inspector.KadInspector/DumpNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KadInspectorServer).DumpNodes(ctx, req.(*DumpNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KadInspector_GetBucketList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBucketListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KadInspectorServer).GetBucketList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/inspector.KadInspector/GetBucketList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KadInspectorServer).GetBucketList(ctx, req.(*GetBucketListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _KadInspector_serviceDesc = grpc.ServiceDesc{ - ServiceName: "inspector.KadInspector", - HandlerType: (*KadInspectorServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CountNodes", - Handler: _KadInspector_CountNodes_Handler, - }, - { - MethodName: "PingNode", - Handler: _KadInspector_PingNode_Handler, - }, - { - MethodName: "LookupNode", - Handler: _KadInspector_LookupNode_Handler, - }, - { - MethodName: "NodeInfo", - Handler: _KadInspector_NodeInfo_Handler, - }, - { - MethodName: "FindNear", - Handler: _KadInspector_FindNear_Handler, - }, - { - MethodName: "DumpNodes", - Handler: _KadInspector_DumpNodes_Handler, - }, - { - MethodName: "GetBucketList", - Handler: _KadInspector_GetBucketList_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "inspector.proto", -} - // OverlayInspectorClient is the client API for OverlayInspector service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. diff --git a/pkg/rpc/compat_drpc.go b/pkg/rpc/compat_drpc.go index f28ef3501..96dc84784 100644 --- a/pkg/rpc/compat_drpc.go +++ b/pkg/rpc/compat_drpc.go @@ -26,9 +26,6 @@ type ( // IrreparableInspectorClient is an alias to the drpc client interface IrreparableInspectorClient = pb.DRPCIrreparableInspectorClient - // KadInspectorClient is an alias to the drpc client interface - KadInspectorClient = pb.DRPCKadInspectorClient - // MetainfoClient is an alias to the drpc client interface MetainfoClient = pb.DRPCMetainfoClient @@ -53,6 +50,9 @@ type ( // PiecestoreClient is an alias to the drpc client interface PiecestoreClient = pb.DRPCPiecestoreClient + // SatelliteGracefulExitClient is an alias to the drpc client interface + SatelliteGracefulExitClient = pb.DRPCSatelliteGracefulExitClient + // VouchersClient is an alias to the drpc client interface VouchersClient = pb.DRPCVouchersClient ) @@ -97,16 +97,6 @@ func (c *Conn) IrreparableInspectorClient() IrreparableInspectorClient { return NewIrreparableInspectorClient(c.raw) } -// NewKadInspectorClient returns the drpc version of a KadInspectorClient -func NewKadInspectorClient(rc *RawConn) KadInspectorClient { - return pb.NewDRPCKadInspectorClient(rc) -} - -// KadInspectorClient returns a KadInspectorClient for this connection -func (c *Conn) KadInspectorClient() KadInspectorClient { - return NewKadInspectorClient(c.raw) -} - // NewMetainfoClient returns the drpc version of a MetainfoClient func NewMetainfoClient(rc *RawConn) MetainfoClient { return pb.NewDRPCMetainfoClient(rc) @@ -187,6 +177,16 @@ func (c *Conn) PiecestoreClient() PiecestoreClient { return NewPiecestoreClient(c.raw) } +// NewSatelliteGracefulExitClient returns the drpc version of a SatelliteGracefulExitClient +func NewSatelliteGracefulExitClient(rc *RawConn) SatelliteGracefulExitClient { + return pb.NewDRPCSatelliteGracefulExitClient(rc) +} + +// SatelliteGracefulExitClient returns a SatelliteGracefulExitClient for this connection +func (c *Conn) SatelliteGracefulExitClient() SatelliteGracefulExitClient { + return NewSatelliteGracefulExitClient(c.raw) +} + // NewVouchersClient returns the drpc version of a VouchersClient func NewVouchersClient(rc *RawConn) VouchersClient { return pb.NewDRPCVouchersClient(rc) diff --git a/pkg/rpc/compat_grpc.go b/pkg/rpc/compat_grpc.go index b8b51b6ae..89fb4e477 100644 --- a/pkg/rpc/compat_grpc.go +++ b/pkg/rpc/compat_grpc.go @@ -27,9 +27,6 @@ type ( // IrreparableInspectorClient is an alias to the grpc client interface IrreparableInspectorClient = pb.IrreparableInspectorClient - // KadInspectorClient is an alias to the grpc client interface - KadInspectorClient = pb.KadInspectorClient - // MetainfoClient is an alias to the grpc client interface MetainfoClient = pb.MetainfoClient @@ -54,6 +51,9 @@ type ( // PiecestoreClient is an alias to the grpc client interface PiecestoreClient = pb.PiecestoreClient + // SatelliteGracefulExitClient is an alias to the grpc client interface + SatelliteGracefulExitClient = pb.SatelliteGracefulExitClient + // VouchersClient is an alias to the grpc client interface VouchersClient = pb.VouchersClient ) @@ -98,16 +98,6 @@ func (c *Conn) IrreparableInspectorClient() IrreparableInspectorClient { return NewIrreparableInspectorClient(c.raw) } -// NewKadInspectorClient returns the grpc version of a KadInspectorClient -func NewKadInspectorClient(rc *RawConn) KadInspectorClient { - return pb.NewKadInspectorClient(rc) -} - -// KadInspectorClient returns a KadInspectorClient for this connection -func (c *Conn) KadInspectorClient() KadInspectorClient { - return NewKadInspectorClient(c.raw) -} - // NewMetainfoClient returns the grpc version of a MetainfoClient func NewMetainfoClient(rc *RawConn) MetainfoClient { return pb.NewMetainfoClient(rc) @@ -188,6 +178,16 @@ func (c *Conn) PiecestoreClient() PiecestoreClient { return NewPiecestoreClient(c.raw) } +// NewSatelliteGracefulExitClient returns the grpc version of a SatelliteGracefulExitClient +func NewSatelliteGracefulExitClient(rc *RawConn) SatelliteGracefulExitClient { + return pb.NewSatelliteGracefulExitClient(rc) +} + +// SatelliteGracefulExitClient returns a SatelliteGracefulExitClient for this connection +func (c *Conn) SatelliteGracefulExitClient() SatelliteGracefulExitClient { + return NewSatelliteGracefulExitClient(c.raw) +} + // NewVouchersClient returns the grpc version of a VouchersClient func NewVouchersClient(rc *RawConn) VouchersClient { return pb.NewVouchersClient(rc) diff --git a/proto.lock b/proto.lock index 9872abd64..f943381b4 100644 --- a/proto.lock +++ b/proto.lock @@ -847,6 +847,251 @@ ] } }, + { + "protopath": "pkg:/:pb:/:gracefulexit.proto", + "def": { + "enums": [ + { + "name": "TransferFailed.Error", + "enum_fields": [ + { + "name": "NOT_FOUND" + }, + { + "name": "STORAGE_NODE_UNAVAILABLE", + "integer": 1 + }, + { + "name": "UNKNOWN", + "integer": 2 + } + ] + }, + { + "name": "ExitFailed.Reason", + "enum_fields": [ + { + "name": "VERIFICATION_FAILED" + } + ] + } + ], + "messages": [ + { + "name": "TransferSucceeded", + "fields": [ + { + "id": 1, + "name": "addressed_order_limit", + "type": "metainfo.AddressedOrderLimit" + }, + { + "id": 2, + "name": "original_piece_hash", + "type": "orders.PieceHash" + }, + { + "id": 3, + "name": "replacement_piece_hash", + "type": "orders.PieceHash" + } + ] + }, + { + "name": "TransferFailed", + "fields": [ + { + "id": 1, + "name": "piece_id", + "type": "bytes", + "options": [ + { + "name": "(gogoproto.customtype)", + "value": "PieceID" + }, + { + "name": "(gogoproto.nullable)", + "value": "false" + } + ] + }, + { + "id": 2, + "name": "error", + "type": "Error" + } + ] + }, + { + "name": "StorageNodeMessage", + "fields": [ + { + "id": 1, + "name": "succeeded", + "type": "TransferSucceeded" + }, + { + "id": 2, + "name": "failed", + "type": "TransferFailed" + } + ] + }, + { + "name": "NotReady" + }, + { + "name": "TransferPiece", + "fields": [ + { + "id": 1, + "name": "piece_id", + "type": "bytes", + "options": [ + { + "name": "(gogoproto.customtype)", + "value": "PieceID" + }, + { + "name": "(gogoproto.nullable)", + "value": "false" + } + ] + }, + { + "id": 2, + "name": "private_key", + "type": "bytes", + "options": [ + { + "name": "(gogoproto.customtype)", + "value": "PiecePrivateKey" + }, + { + "name": "(gogoproto.nullable)", + "value": "false" + } + ] + }, + { + "id": 3, + "name": "addressed_order_limit", + "type": "metainfo.AddressedOrderLimit" + } + ] + }, + { + "name": "DeletePiece", + "fields": [ + { + "id": 1, + "name": "piece_id", + "type": "bytes", + "options": [ + { + "name": "(gogoproto.customtype)", + "value": "PieceID" + }, + { + "name": "(gogoproto.nullable)", + "value": "false" + } + ] + } + ] + }, + { + "name": "ExitCompleted", + "fields": [ + { + "id": 1, + "name": "exit_complete_signature", + "type": "bytes" + } + ] + }, + { + "name": "ExitFailed", + "fields": [ + { + "id": 1, + "name": "exit_failure_signature", + "type": "bytes" + }, + { + "id": 2, + "name": "reason", + "type": "Reason" + } + ] + }, + { + "name": "SatelliteMessage", + "fields": [ + { + "id": 1, + "name": "not_ready", + "type": "NotReady" + }, + { + "id": 2, + "name": "transfer_piece", + "type": "TransferPiece" + }, + { + "id": 3, + "name": "delete_piece", + "type": "DeletePiece" + }, + { + "id": 4, + "name": "exit_completed", + "type": "ExitCompleted" + }, + { + "id": 5, + "name": "exit_failed", + "type": "ExitFailed" + } + ] + } + ], + "services": [ + { + "name": "SatelliteGracefulExit", + "rpcs": [ + { + "name": "Process", + "in_type": "StorageNodeMessage", + "out_type": "SatelliteMessage", + "in_streamed": true, + "out_streamed": true + } + ] + } + ], + "imports": [ + { + "path": "gogo.proto" + }, + { + "path": "metainfo.proto" + }, + { + "path": "orders.proto" + } + ], + "package": { + "name": "gracefulexit" + }, + "options": [ + { + "name": "go_package", + "value": "pb" + } + ] + } + }, { "protopath": "pkg:/:pb:/:inspector.proto", "def": {