storj/storagenode/internalpb/gracefulexit_drpc.pb.go

236 lines
8.4 KiB
Go
Raw Permalink Normal View History

// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
// protoc-gen-go-drpc version: v0.0.20
// source: gracefulexit.proto
package internalpb
import (
bytes "bytes"
context "context"
errors "errors"
jsonpb "github.com/gogo/protobuf/jsonpb"
proto "github.com/gogo/protobuf/proto"
drpc "storj.io/drpc"
drpcerr "storj.io/drpc/drpcerr"
)
type drpcEncoding_File_gracefulexit_proto struct{}
func (drpcEncoding_File_gracefulexit_proto) Marshal(msg drpc.Message) ([]byte, error) {
return proto.Marshal(msg.(proto.Message))
}
func (drpcEncoding_File_gracefulexit_proto) Unmarshal(buf []byte, msg drpc.Message) error {
return proto.Unmarshal(buf, msg.(proto.Message))
}
func (drpcEncoding_File_gracefulexit_proto) JSONMarshal(msg drpc.Message) ([]byte, error) {
var buf bytes.Buffer
err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message))
if err != nil {
return nil, err
}
return buf.Bytes(), nil
}
func (drpcEncoding_File_gracefulexit_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error {
return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message))
}
type DRPCNodeGracefulExitClient interface {
DRPCConn() drpc.Conn
GetNonExitingSatellites(ctx context.Context, in *GetNonExitingSatellitesRequest) (*GetNonExitingSatellitesResponse, error)
InitiateGracefulExit(ctx context.Context, in *InitiateGracefulExitRequest) (*ExitProgress, error)
GetExitProgress(ctx context.Context, in *GetExitProgressRequest) (*GetExitProgressResponse, error)
GracefulExitFeasibility(ctx context.Context, in *GracefulExitFeasibilityRequest) (*GracefulExitFeasibilityResponse, error)
}
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, "/storagenode.gracefulexit.NodeGracefulExit/GetNonExitingSatellites", drpcEncoding_File_gracefulexit_proto{}, in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *drpcNodeGracefulExitClient) InitiateGracefulExit(ctx context.Context, in *InitiateGracefulExitRequest) (*ExitProgress, error) {
out := new(ExitProgress)
err := c.cc.Invoke(ctx, "/storagenode.gracefulexit.NodeGracefulExit/InitiateGracefulExit", drpcEncoding_File_gracefulexit_proto{}, 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, "/storagenode.gracefulexit.NodeGracefulExit/GetExitProgress", drpcEncoding_File_gracefulexit_proto{}, in, out)
if err != nil {
return nil, err
}
return out, nil
}
func (c *drpcNodeGracefulExitClient) GracefulExitFeasibility(ctx context.Context, in *GracefulExitFeasibilityRequest) (*GracefulExitFeasibilityResponse, error) {
out := new(GracefulExitFeasibilityResponse)
err := c.cc.Invoke(ctx, "/storagenode.gracefulexit.NodeGracefulExit/GracefulExitFeasibility", drpcEncoding_File_gracefulexit_proto{}, in, out)
if err != nil {
return nil, err
}
return out, nil
}
type DRPCNodeGracefulExitServer interface {
GetNonExitingSatellites(context.Context, *GetNonExitingSatellitesRequest) (*GetNonExitingSatellitesResponse, error)
InitiateGracefulExit(context.Context, *InitiateGracefulExitRequest) (*ExitProgress, error)
GetExitProgress(context.Context, *GetExitProgressRequest) (*GetExitProgressResponse, error)
GracefulExitFeasibility(context.Context, *GracefulExitFeasibilityRequest) (*GracefulExitFeasibilityResponse, error)
}
type DRPCNodeGracefulExitUnimplementedServer struct{}
func (s *DRPCNodeGracefulExitUnimplementedServer) GetNonExitingSatellites(context.Context, *GetNonExitingSatellitesRequest) (*GetNonExitingSatellitesResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
}
func (s *DRPCNodeGracefulExitUnimplementedServer) InitiateGracefulExit(context.Context, *InitiateGracefulExitRequest) (*ExitProgress, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
}
func (s *DRPCNodeGracefulExitUnimplementedServer) GetExitProgress(context.Context, *GetExitProgressRequest) (*GetExitProgressResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
}
func (s *DRPCNodeGracefulExitUnimplementedServer) GracefulExitFeasibility(context.Context, *GracefulExitFeasibilityRequest) (*GracefulExitFeasibilityResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
}
type DRPCNodeGracefulExitDescription struct{}
func (DRPCNodeGracefulExitDescription) NumMethods() int { return 4 }
func (DRPCNodeGracefulExitDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
switch n {
case 0:
return "/storagenode.gracefulexit.NodeGracefulExit/GetNonExitingSatellites", drpcEncoding_File_gracefulexit_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCNodeGracefulExitServer).
GetNonExitingSatellites(
ctx,
in1.(*GetNonExitingSatellitesRequest),
)
}, DRPCNodeGracefulExitServer.GetNonExitingSatellites, true
case 1:
return "/storagenode.gracefulexit.NodeGracefulExit/InitiateGracefulExit", drpcEncoding_File_gracefulexit_proto{},
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 "/storagenode.gracefulexit.NodeGracefulExit/GetExitProgress", drpcEncoding_File_gracefulexit_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCNodeGracefulExitServer).
GetExitProgress(
ctx,
in1.(*GetExitProgressRequest),
)
}, DRPCNodeGracefulExitServer.GetExitProgress, true
case 3:
return "/storagenode.gracefulexit.NodeGracefulExit/GracefulExitFeasibility", drpcEncoding_File_gracefulexit_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCNodeGracefulExitServer).
GracefulExitFeasibility(
ctx,
in1.(*GracefulExitFeasibilityRequest),
)
}, DRPCNodeGracefulExitServer.GracefulExitFeasibility, true
default:
return "", nil, nil, nil, false
}
}
func DRPCRegisterNodeGracefulExit(mux drpc.Mux, impl DRPCNodeGracefulExitServer) error {
return mux.Register(impl, DRPCNodeGracefulExitDescription{})
}
type DRPCNodeGracefulExit_GetNonExitingSatellitesStream interface {
drpc.Stream
SendAndClose(*GetNonExitingSatellitesResponse) error
}
type drpcNodeGracefulExit_GetNonExitingSatellitesStream struct {
drpc.Stream
}
func (x *drpcNodeGracefulExit_GetNonExitingSatellitesStream) SendAndClose(m *GetNonExitingSatellitesResponse) error {
if err := x.MsgSend(m, drpcEncoding_File_gracefulexit_proto{}); err != nil {
return err
}
return x.CloseSend()
}
type DRPCNodeGracefulExit_InitiateGracefulExitStream interface {
drpc.Stream
SendAndClose(*ExitProgress) error
}
type drpcNodeGracefulExit_InitiateGracefulExitStream struct {
drpc.Stream
}
func (x *drpcNodeGracefulExit_InitiateGracefulExitStream) SendAndClose(m *ExitProgress) error {
if err := x.MsgSend(m, drpcEncoding_File_gracefulexit_proto{}); err != nil {
return err
}
return x.CloseSend()
}
type DRPCNodeGracefulExit_GetExitProgressStream interface {
drpc.Stream
SendAndClose(*GetExitProgressResponse) error
}
type drpcNodeGracefulExit_GetExitProgressStream struct {
drpc.Stream
}
func (x *drpcNodeGracefulExit_GetExitProgressStream) SendAndClose(m *GetExitProgressResponse) error {
if err := x.MsgSend(m, drpcEncoding_File_gracefulexit_proto{}); err != nil {
return err
}
return x.CloseSend()
}
type DRPCNodeGracefulExit_GracefulExitFeasibilityStream interface {
drpc.Stream
SendAndClose(*GracefulExitFeasibilityResponse) error
}
type drpcNodeGracefulExit_GracefulExitFeasibilityStream struct {
drpc.Stream
}
func (x *drpcNodeGracefulExit_GracefulExitFeasibilityStream) SendAndClose(m *GracefulExitFeasibilityResponse) error {
if err := x.MsgSend(m, drpcEncoding_File_gracefulexit_proto{}); err != nil {
return err
}
return x.CloseSend()
}