// Code generated by protoc-gen-go-drpc. DO NOT EDIT. // protoc-gen-go-drpc version: v0.0.19 // source: inspector.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_inspector_proto struct{} func (drpcEncoding_File_inspector_proto) Marshal(msg drpc.Message) ([]byte, error) { return proto.Marshal(msg.(proto.Message)) } func (drpcEncoding_File_inspector_proto) Unmarshal(buf []byte, msg drpc.Message) error { return proto.Unmarshal(buf, msg.(proto.Message)) } func (drpcEncoding_File_inspector_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_inspector_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) } type DRPCPieceStoreInspectorClient interface { DRPCConn() drpc.Conn Stats(ctx context.Context, in *StatsRequest) (*StatSummaryResponse, error) Dashboard(ctx context.Context, in *DashboardRequest) (*DashboardResponse, error) } type drpcPieceStoreInspectorClient struct { cc drpc.Conn } func NewDRPCPieceStoreInspectorClient(cc drpc.Conn) DRPCPieceStoreInspectorClient { return &drpcPieceStoreInspectorClient{cc} } func (c *drpcPieceStoreInspectorClient) DRPCConn() drpc.Conn { return c.cc } func (c *drpcPieceStoreInspectorClient) Stats(ctx context.Context, in *StatsRequest) (*StatSummaryResponse, error) { out := new(StatSummaryResponse) err := c.cc.Invoke(ctx, "/storagenode.inspector.PieceStoreInspector/Stats", drpcEncoding_File_inspector_proto{}, in, out) if err != nil { return nil, err } return out, nil } func (c *drpcPieceStoreInspectorClient) Dashboard(ctx context.Context, in *DashboardRequest) (*DashboardResponse, error) { out := new(DashboardResponse) err := c.cc.Invoke(ctx, "/storagenode.inspector.PieceStoreInspector/Dashboard", drpcEncoding_File_inspector_proto{}, in, out) if err != nil { return nil, err } return out, nil } type DRPCPieceStoreInspectorServer interface { Stats(context.Context, *StatsRequest) (*StatSummaryResponse, error) Dashboard(context.Context, *DashboardRequest) (*DashboardResponse, error) } type DRPCPieceStoreInspectorUnimplementedServer struct{} func (s *DRPCPieceStoreInspectorUnimplementedServer) Stats(context.Context, *StatsRequest) (*StatSummaryResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) } func (s *DRPCPieceStoreInspectorUnimplementedServer) Dashboard(context.Context, *DashboardRequest) (*DashboardResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) } type DRPCPieceStoreInspectorDescription struct{} func (DRPCPieceStoreInspectorDescription) NumMethods() int { return 2 } func (DRPCPieceStoreInspectorDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { case 0: return "/storagenode.inspector.PieceStoreInspector/Stats", drpcEncoding_File_inspector_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCPieceStoreInspectorServer). Stats( ctx, in1.(*StatsRequest), ) }, DRPCPieceStoreInspectorServer.Stats, true case 1: return "/storagenode.inspector.PieceStoreInspector/Dashboard", drpcEncoding_File_inspector_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCPieceStoreInspectorServer). Dashboard( ctx, in1.(*DashboardRequest), ) }, DRPCPieceStoreInspectorServer.Dashboard, true default: return "", nil, nil, nil, false } } func DRPCRegisterPieceStoreInspector(mux drpc.Mux, impl DRPCPieceStoreInspectorServer) error { return mux.Register(impl, DRPCPieceStoreInspectorDescription{}) } type DRPCPieceStoreInspector_StatsStream interface { drpc.Stream SendAndClose(*StatSummaryResponse) error } type drpcPieceStoreInspector_StatsStream struct { drpc.Stream } func (x *drpcPieceStoreInspector_StatsStream) SendAndClose(m *StatSummaryResponse) error { if err := x.MsgSend(m, drpcEncoding_File_inspector_proto{}); err != nil { return err } return x.CloseSend() } type DRPCPieceStoreInspector_DashboardStream interface { drpc.Stream SendAndClose(*DashboardResponse) error } type drpcPieceStoreInspector_DashboardStream struct { drpc.Stream } func (x *drpcPieceStoreInspector_DashboardStream) SendAndClose(m *DashboardResponse) error { if err := x.MsgSend(m, drpcEncoding_File_inspector_proto{}); err != nil { return err } return x.CloseSend() }