2019-10-08 18:42:56 +01:00
|
|
|
// 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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{8, 0}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{14, 0}
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type GetNonExitingSatellitesRequest struct {
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GetNonExitingSatellitesRequest) Reset() { *m = GetNonExitingSatellitesRequest{} }
|
|
|
|
func (m *GetNonExitingSatellitesRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*GetNonExitingSatellitesRequest) ProtoMessage() {}
|
|
|
|
func (*GetNonExitingSatellitesRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{0}
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_GetNonExitingSatellitesRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_GetNonExitingSatellitesRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_GetNonExitingSatellitesRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_GetNonExitingSatellitesRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_GetNonExitingSatellitesRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetNonExitingSatellitesRequest proto.InternalMessageInfo
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
type InitiateGracefulExitRequest struct {
|
|
|
|
NodeId NodeID `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3,customtype=NodeID" json:"node_id"`
|
2019-10-11 14:58:12 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *InitiateGracefulExitRequest) Reset() { *m = InitiateGracefulExitRequest{} }
|
|
|
|
func (m *InitiateGracefulExitRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InitiateGracefulExitRequest) ProtoMessage() {}
|
|
|
|
func (*InitiateGracefulExitRequest) Descriptor() ([]byte, []int) {
|
2019-10-11 14:58:12 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{1}
|
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *InitiateGracefulExitRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_InitiateGracefulExitRequest.Unmarshal(m, b)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *InitiateGracefulExitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_InitiateGracefulExitRequest.Marshal(b, m, deterministic)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *InitiateGracefulExitRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_InitiateGracefulExitRequest.Merge(m, src)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *InitiateGracefulExitRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_InitiateGracefulExitRequest.Size(m)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *InitiateGracefulExitRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_InitiateGracefulExitRequest.DiscardUnknown(m)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
var xxx_messageInfo_InitiateGracefulExitRequest proto.InternalMessageInfo
|
2019-10-11 14:58:12 +01:00
|
|
|
|
2019-10-14 22:06:04 +01:00
|
|
|
// NonExitingSatellite contains information that's needed for a storagenode to start graceful exit
|
2019-10-11 14:58:12 +01:00
|
|
|
type NonExitingSatellite struct {
|
|
|
|
NodeId NodeID `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3,customtype=NodeID" json:"node_id"`
|
|
|
|
DomainName string `protobuf:"bytes,2,opt,name=domain_name,json=domainName,proto3" json:"domain_name,omitempty"`
|
|
|
|
SpaceUsed float64 `protobuf:"fixed64,3,opt,name=space_used,json=spaceUsed,proto3" json:"space_used,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NonExitingSatellite) Reset() { *m = NonExitingSatellite{} }
|
|
|
|
func (m *NonExitingSatellite) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*NonExitingSatellite) ProtoMessage() {}
|
|
|
|
func (*NonExitingSatellite) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{2}
|
|
|
|
}
|
|
|
|
func (m *NonExitingSatellite) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_NonExitingSatellite.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *NonExitingSatellite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_NonExitingSatellite.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *NonExitingSatellite) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_NonExitingSatellite.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *NonExitingSatellite) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_NonExitingSatellite.Size(m)
|
|
|
|
}
|
|
|
|
func (m *NonExitingSatellite) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_NonExitingSatellite.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_NonExitingSatellite proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *NonExitingSatellite) GetDomainName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.DomainName
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *NonExitingSatellite) GetSpaceUsed() float64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.SpaceUsed
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetNonExitingSatellitesResponse struct {
|
|
|
|
Satellites []*NonExitingSatellite `protobuf:"bytes,1,rep,name=satellites,proto3" json:"satellites,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GetNonExitingSatellitesResponse) Reset() { *m = GetNonExitingSatellitesResponse{} }
|
|
|
|
func (m *GetNonExitingSatellitesResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*GetNonExitingSatellitesResponse) ProtoMessage() {}
|
|
|
|
func (*GetNonExitingSatellitesResponse) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{3}
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_GetNonExitingSatellitesResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_GetNonExitingSatellitesResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_GetNonExitingSatellitesResponse.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_GetNonExitingSatellitesResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *GetNonExitingSatellitesResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_GetNonExitingSatellitesResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetNonExitingSatellitesResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *GetNonExitingSatellitesResponse) GetSatellites() []*NonExitingSatellite {
|
|
|
|
if m != nil {
|
|
|
|
return m.Satellites
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
type GetExitProgressRequest struct {
|
2019-10-11 14:58:12 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressRequest) Reset() { *m = GetExitProgressRequest{} }
|
|
|
|
func (m *GetExitProgressRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*GetExitProgressRequest) ProtoMessage() {}
|
|
|
|
func (*GetExitProgressRequest) Descriptor() ([]byte, []int) {
|
2019-10-11 14:58:12 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{4}
|
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_GetExitProgressRequest.Unmarshal(m, b)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_GetExitProgressRequest.Marshal(b, m, deterministic)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_GetExitProgressRequest.Merge(m, src)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_GetExitProgressRequest.Size(m)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_GetExitProgressRequest.DiscardUnknown(m)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
var xxx_messageInfo_GetExitProgressRequest proto.InternalMessageInfo
|
2019-10-11 14:58:12 +01:00
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
type GetExitProgressResponse struct {
|
|
|
|
Progress []*ExitProgress `protobuf:"bytes,1,rep,name=progress,proto3" json:"progress,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GetExitProgressResponse) Reset() { *m = GetExitProgressResponse{} }
|
|
|
|
func (m *GetExitProgressResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*GetExitProgressResponse) ProtoMessage() {}
|
|
|
|
func (*GetExitProgressResponse) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{5}
|
|
|
|
}
|
|
|
|
func (m *GetExitProgressResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_GetExitProgressResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *GetExitProgressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_GetExitProgressResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *GetExitProgressResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_GetExitProgressResponse.Merge(m, src)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_GetExitProgressResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *GetExitProgressResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_GetExitProgressResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetExitProgressResponse proto.InternalMessageInfo
|
2019-10-11 14:58:12 +01:00
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *GetExitProgressResponse) GetProgress() []*ExitProgress {
|
2019-10-11 14:58:12 +01:00
|
|
|
if m != nil {
|
2019-10-15 23:07:32 +01:00
|
|
|
return m.Progress
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
return nil
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
type ExitProgress struct {
|
|
|
|
DomainName string `protobuf:"bytes,1,opt,name=domain_name,json=domainName,proto3" json:"domain_name,omitempty"`
|
|
|
|
NodeId NodeID `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3,customtype=NodeID" json:"node_id"`
|
|
|
|
PercentComplete float32 `protobuf:"fixed32,3,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"`
|
|
|
|
Successful bool `protobuf:"varint,4,opt,name=successful,proto3" json:"successful,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *ExitProgress) Reset() { *m = ExitProgress{} }
|
|
|
|
func (m *ExitProgress) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ExitProgress) ProtoMessage() {}
|
|
|
|
func (*ExitProgress) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{6}
|
|
|
|
}
|
|
|
|
func (m *ExitProgress) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ExitProgress.Unmarshal(m, b)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *ExitProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ExitProgress.Marshal(b, m, deterministic)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *ExitProgress) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ExitProgress.Merge(m, src)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *ExitProgress) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ExitProgress.Size(m)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *ExitProgress) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ExitProgress.DiscardUnknown(m)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
|
|
|
|
var xxx_messageInfo_ExitProgress proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ExitProgress) GetDomainName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.DomainName
|
|
|
|
}
|
|
|
|
return ""
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *ExitProgress) GetPercentComplete() float32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.PercentComplete
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
2019-10-11 14:58:12 +01:00
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (m *ExitProgress) GetSuccessful() bool {
|
2019-10-11 14:58:12 +01:00
|
|
|
if m != nil {
|
2019-10-15 23:07:32 +01:00
|
|
|
return m.Successful
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
2019-10-15 23:07:32 +01:00
|
|
|
return false
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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"`
|
2019-10-15 20:59:12 +01:00
|
|
|
OriginalPieceId PieceID `protobuf:"bytes,4,opt,name=original_piece_id,json=originalPieceId,proto3,customtype=PieceID" json:"original_piece_id"`
|
2019-10-08 18:42:56 +01:00
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{7}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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 {
|
2019-10-15 20:59:12 +01:00
|
|
|
OriginalPieceId PieceID `protobuf:"bytes,1,opt,name=original_piece_id,json=originalPieceId,proto3,customtype=PieceID" json:"original_piece_id"`
|
2019-10-08 18:42:56 +01:00
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{8}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{9}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{10}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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 {
|
2019-10-15 20:59:12 +01:00
|
|
|
OriginalPieceId PieceID `protobuf:"bytes,1,opt,name=original_piece_id,json=originalPieceId,proto3,customtype=PieceID" json:"original_piece_id"`
|
|
|
|
PrivateKey PiecePrivateKey `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3,customtype=PiecePrivateKey" json:"private_key"`
|
2019-10-08 18:42:56 +01:00
|
|
|
// 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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{11}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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 {
|
2019-10-15 20:59:12 +01:00
|
|
|
OriginalPieceId PieceID `protobuf:"bytes,1,opt,name=original_piece_id,json=originalPieceId,proto3,customtype=PieceID" json:"original_piece_id"`
|
2019-10-08 18:42:56 +01:00
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{12}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{13}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{14}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return fileDescriptor_8f0acbf2ce5fa631, []int{15}
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
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)
|
2019-10-11 14:58:12 +01:00
|
|
|
proto.RegisterType((*GetNonExitingSatellitesRequest)(nil), "gracefulexit.GetNonExitingSatellitesRequest")
|
2019-10-15 23:07:32 +01:00
|
|
|
proto.RegisterType((*InitiateGracefulExitRequest)(nil), "gracefulexit.InitiateGracefulExitRequest")
|
2019-10-11 14:58:12 +01:00
|
|
|
proto.RegisterType((*NonExitingSatellite)(nil), "gracefulexit.NonExitingSatellite")
|
|
|
|
proto.RegisterType((*GetNonExitingSatellitesResponse)(nil), "gracefulexit.GetNonExitingSatellitesResponse")
|
2019-10-15 23:07:32 +01:00
|
|
|
proto.RegisterType((*GetExitProgressRequest)(nil), "gracefulexit.GetExitProgressRequest")
|
|
|
|
proto.RegisterType((*GetExitProgressResponse)(nil), "gracefulexit.GetExitProgressResponse")
|
|
|
|
proto.RegisterType((*ExitProgress)(nil), "gracefulexit.ExitProgress")
|
2019-10-08 18:42:56 +01:00
|
|
|
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{
|
2019-10-15 23:07:32 +01:00
|
|
|
// 1053 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xe1, 0x6e, 0x1b, 0x45,
|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0x63, 0xff, 0xd6, 0xb7, 0xd9, 0xe0, 0xe5, 0xcb, 0x5c, 0xf8, 0x7a, 0xfc, 0xf8, 0xdf,
|
|
|
|
0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xe2, 0xc3, 0xb2, 0x8b, 0x0a, 0x00, 0x00,
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type DRPCNodeGracefulExitClient interface {
|
|
|
|
DRPCConn() drpc.Conn
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
// GetSatellitesList returns a list of satellites that the storagenode has not exited.
|
2019-10-11 14:58:12 +01:00
|
|
|
GetNonExitingSatellites(ctx context.Context, in *GetNonExitingSatellitesRequest) (*GetNonExitingSatellitesResponse, error)
|
2019-10-15 23:07:32 +01:00
|
|
|
// InitiateGracefulExit updates one or more satellites in the storagenode's database to be gracefully exiting.
|
|
|
|
InitiateGracefulExit(ctx context.Context, in *InitiateGracefulExitRequest) (*ExitProgress, error)
|
|
|
|
// GetExitProgress returns graceful exit status on each satellite for a given storagenode.
|
|
|
|
GetExitProgress(ctx context.Context, in *GetExitProgressRequest) (*GetExitProgressResponse, error)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type drpcNodeGracefulExitClient struct {
|
|
|
|
cc drpc.Conn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewDRPCNodeGracefulExitClient(cc drpc.Conn) DRPCNodeGracefulExitClient {
|
|
|
|
return &drpcNodeGracefulExitClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *drpcNodeGracefulExitClient) DRPCConn() drpc.Conn { return c.cc }
|
|
|
|
|
|
|
|
func (c *drpcNodeGracefulExitClient) GetNonExitingSatellites(ctx context.Context, in *GetNonExitingSatellitesRequest) (*GetNonExitingSatellitesResponse, error) {
|
|
|
|
out := new(GetNonExitingSatellitesResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/gracefulexit.NodeGracefulExit/GetNonExitingSatellites", in, out)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (c *drpcNodeGracefulExitClient) InitiateGracefulExit(ctx context.Context, in *InitiateGracefulExitRequest) (*ExitProgress, error) {
|
|
|
|
out := new(ExitProgress)
|
|
|
|
err := c.cc.Invoke(ctx, "/gracefulexit.NodeGracefulExit/InitiateGracefulExit", in, out)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *drpcNodeGracefulExitClient) GetExitProgress(ctx context.Context, in *GetExitProgressRequest) (*GetExitProgressResponse, error) {
|
|
|
|
out := new(GetExitProgressResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/gracefulexit.NodeGracefulExit/GetExitProgress", in, out)
|
2019-10-11 14:58:12 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type DRPCNodeGracefulExitServer interface {
|
2019-10-15 23:07:32 +01:00
|
|
|
// GetSatellitesList returns a list of satellites that the storagenode has not exited.
|
2019-10-11 14:58:12 +01:00
|
|
|
GetNonExitingSatellites(context.Context, *GetNonExitingSatellitesRequest) (*GetNonExitingSatellitesResponse, error)
|
2019-10-15 23:07:32 +01:00
|
|
|
// InitiateGracefulExit updates one or more satellites in the storagenode's database to be gracefully exiting.
|
|
|
|
InitiateGracefulExit(context.Context, *InitiateGracefulExitRequest) (*ExitProgress, error)
|
|
|
|
// GetExitProgress returns graceful exit status on each satellite for a given storagenode.
|
|
|
|
GetExitProgress(context.Context, *GetExitProgressRequest) (*GetExitProgressResponse, error)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type DRPCNodeGracefulExitDescription struct{}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (DRPCNodeGracefulExitDescription) NumMethods() int { return 3 }
|
2019-10-11 14:58:12 +01:00
|
|
|
|
|
|
|
func (DRPCNodeGracefulExitDescription) Method(n int) (string, drpc.Handler, interface{}, bool) {
|
|
|
|
switch n {
|
|
|
|
case 0:
|
|
|
|
return "/gracefulexit.NodeGracefulExit/GetNonExitingSatellites",
|
|
|
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
|
|
|
return srv.(DRPCNodeGracefulExitServer).
|
|
|
|
GetNonExitingSatellites(
|
|
|
|
ctx,
|
|
|
|
in1.(*GetNonExitingSatellitesRequest),
|
|
|
|
)
|
|
|
|
}, DRPCNodeGracefulExitServer.GetNonExitingSatellites, true
|
|
|
|
case 1:
|
2019-10-15 23:07:32 +01:00
|
|
|
return "/gracefulexit.NodeGracefulExit/InitiateGracefulExit",
|
|
|
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
|
|
|
return srv.(DRPCNodeGracefulExitServer).
|
|
|
|
InitiateGracefulExit(
|
|
|
|
ctx,
|
|
|
|
in1.(*InitiateGracefulExitRequest),
|
|
|
|
)
|
|
|
|
}, DRPCNodeGracefulExitServer.InitiateGracefulExit, true
|
|
|
|
case 2:
|
|
|
|
return "/gracefulexit.NodeGracefulExit/GetExitProgress",
|
2019-10-11 14:58:12 +01:00
|
|
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
|
|
|
return srv.(DRPCNodeGracefulExitServer).
|
2019-10-15 23:07:32 +01:00
|
|
|
GetExitProgress(
|
2019-10-11 14:58:12 +01:00
|
|
|
ctx,
|
2019-10-15 23:07:32 +01:00
|
|
|
in1.(*GetExitProgressRequest),
|
2019-10-11 14:58:12 +01:00
|
|
|
)
|
2019-10-15 23:07:32 +01:00
|
|
|
}, DRPCNodeGracefulExitServer.GetExitProgress, true
|
2019-10-11 14:58:12 +01:00
|
|
|
default:
|
|
|
|
return "", nil, nil, false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func DRPCRegisterNodeGracefulExit(srv drpc.Server, impl DRPCNodeGracefulExitServer) {
|
|
|
|
srv.Register(impl, DRPCNodeGracefulExitDescription{})
|
|
|
|
}
|
|
|
|
|
|
|
|
type DRPCNodeGracefulExit_GetNonExitingSatellitesStream interface {
|
|
|
|
drpc.Stream
|
|
|
|
SendAndClose(*GetNonExitingSatellitesResponse) error
|
|
|
|
}
|
|
|
|
|
|
|
|
type drpcNodeGracefulExitGetNonExitingSatellitesStream struct {
|
|
|
|
drpc.Stream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *drpcNodeGracefulExitGetNonExitingSatellitesStream) SendAndClose(m *GetNonExitingSatellitesResponse) error {
|
|
|
|
if err := x.MsgSend(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return x.CloseSend()
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
type DRPCNodeGracefulExit_InitiateGracefulExitStream interface {
|
|
|
|
drpc.Stream
|
|
|
|
SendAndClose(*ExitProgress) error
|
|
|
|
}
|
|
|
|
|
|
|
|
type drpcNodeGracefulExitInitiateGracefulExitStream struct {
|
|
|
|
drpc.Stream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *drpcNodeGracefulExitInitiateGracefulExitStream) SendAndClose(m *ExitProgress) error {
|
|
|
|
if err := x.MsgSend(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return x.CloseSend()
|
|
|
|
}
|
|
|
|
|
|
|
|
type DRPCNodeGracefulExit_GetExitProgressStream interface {
|
2019-10-11 14:58:12 +01:00
|
|
|
drpc.Stream
|
2019-10-15 23:07:32 +01:00
|
|
|
SendAndClose(*GetExitProgressResponse) error
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
type drpcNodeGracefulExitGetExitProgressStream struct {
|
2019-10-11 14:58:12 +01:00
|
|
|
drpc.Stream
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (x *drpcNodeGracefulExitGetExitProgressStream) SendAndClose(m *GetExitProgressResponse) error {
|
2019-10-11 14:58:12 +01:00
|
|
|
if err := x.MsgSend(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return x.CloseSend()
|
2019-10-08 18:42:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2019-10-11 14:58:12 +01:00
|
|
|
// NodeGracefulExitClient is the client API for NodeGracefulExit service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type NodeGracefulExitClient interface {
|
2019-10-15 23:07:32 +01:00
|
|
|
// GetSatellitesList returns a list of satellites that the storagenode has not exited.
|
2019-10-11 14:58:12 +01:00
|
|
|
GetNonExitingSatellites(ctx context.Context, in *GetNonExitingSatellitesRequest, opts ...grpc.CallOption) (*GetNonExitingSatellitesResponse, error)
|
2019-10-15 23:07:32 +01:00
|
|
|
// InitiateGracefulExit updates one or more satellites in the storagenode's database to be gracefully exiting.
|
|
|
|
InitiateGracefulExit(ctx context.Context, in *InitiateGracefulExitRequest, opts ...grpc.CallOption) (*ExitProgress, error)
|
|
|
|
// GetExitProgress returns graceful exit status on each satellite for a given storagenode.
|
|
|
|
GetExitProgress(ctx context.Context, in *GetExitProgressRequest, opts ...grpc.CallOption) (*GetExitProgressResponse, error)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type nodeGracefulExitClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewNodeGracefulExitClient(cc *grpc.ClientConn) NodeGracefulExitClient {
|
|
|
|
return &nodeGracefulExitClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *nodeGracefulExitClient) GetNonExitingSatellites(ctx context.Context, in *GetNonExitingSatellitesRequest, opts ...grpc.CallOption) (*GetNonExitingSatellitesResponse, error) {
|
|
|
|
out := new(GetNonExitingSatellitesResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/gracefulexit.NodeGracefulExit/GetNonExitingSatellites", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func (c *nodeGracefulExitClient) InitiateGracefulExit(ctx context.Context, in *InitiateGracefulExitRequest, opts ...grpc.CallOption) (*ExitProgress, error) {
|
|
|
|
out := new(ExitProgress)
|
|
|
|
err := c.cc.Invoke(ctx, "/gracefulexit.NodeGracefulExit/InitiateGracefulExit", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *nodeGracefulExitClient) GetExitProgress(ctx context.Context, in *GetExitProgressRequest, opts ...grpc.CallOption) (*GetExitProgressResponse, error) {
|
|
|
|
out := new(GetExitProgressResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/gracefulexit.NodeGracefulExit/GetExitProgress", in, out, opts...)
|
2019-10-11 14:58:12 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// NodeGracefulExitServer is the server API for NodeGracefulExit service.
|
|
|
|
type NodeGracefulExitServer interface {
|
2019-10-15 23:07:32 +01:00
|
|
|
// GetSatellitesList returns a list of satellites that the storagenode has not exited.
|
2019-10-11 14:58:12 +01:00
|
|
|
GetNonExitingSatellites(context.Context, *GetNonExitingSatellitesRequest) (*GetNonExitingSatellitesResponse, error)
|
2019-10-15 23:07:32 +01:00
|
|
|
// InitiateGracefulExit updates one or more satellites in the storagenode's database to be gracefully exiting.
|
|
|
|
InitiateGracefulExit(context.Context, *InitiateGracefulExitRequest) (*ExitProgress, error)
|
|
|
|
// GetExitProgress returns graceful exit status on each satellite for a given storagenode.
|
|
|
|
GetExitProgress(context.Context, *GetExitProgressRequest) (*GetExitProgressResponse, error)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterNodeGracefulExitServer(s *grpc.Server, srv NodeGracefulExitServer) {
|
|
|
|
s.RegisterService(&_NodeGracefulExit_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _NodeGracefulExit_GetNonExitingSatellites_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(GetNonExitingSatellitesRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(NodeGracefulExitServer).GetNonExitingSatellites(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/gracefulexit.NodeGracefulExit/GetNonExitingSatellites",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(NodeGracefulExitServer).GetNonExitingSatellites(ctx, req.(*GetNonExitingSatellitesRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2019-10-15 23:07:32 +01:00
|
|
|
func _NodeGracefulExit_InitiateGracefulExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(InitiateGracefulExitRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(NodeGracefulExitServer).InitiateGracefulExit(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/gracefulexit.NodeGracefulExit/InitiateGracefulExit",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(NodeGracefulExitServer).InitiateGracefulExit(ctx, req.(*InitiateGracefulExitRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _NodeGracefulExit_GetExitProgress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(GetExitProgressRequest)
|
2019-10-11 14:58:12 +01:00
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
2019-10-15 23:07:32 +01:00
|
|
|
return srv.(NodeGracefulExitServer).GetExitProgress(ctx, in)
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2019-10-15 23:07:32 +01:00
|
|
|
FullMethod: "/gracefulexit.NodeGracefulExit/GetExitProgress",
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2019-10-15 23:07:32 +01:00
|
|
|
return srv.(NodeGracefulExitServer).GetExitProgress(ctx, req.(*GetExitProgressRequest))
|
2019-10-11 14:58:12 +01:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _NodeGracefulExit_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "gracefulexit.NodeGracefulExit",
|
|
|
|
HandlerType: (*NodeGracefulExitServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "GetNonExitingSatellites",
|
|
|
|
Handler: _NodeGracefulExit_GetNonExitingSatellites_Handler,
|
|
|
|
},
|
|
|
|
{
|
2019-10-15 23:07:32 +01:00
|
|
|
MethodName: "InitiateGracefulExit",
|
|
|
|
Handler: _NodeGracefulExit_InitiateGracefulExit_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "GetExitProgress",
|
|
|
|
Handler: _NodeGracefulExit_GetExitProgress_Handler,
|
2019-10-11 14:58:12 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "gracefulexit.proto",
|
|
|
|
}
|
|
|
|
|
2019-10-08 18:42:56 +01:00
|
|
|
// 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",
|
|
|
|
}
|