cda67a659a
Change-Id: I951379c3b2ff00d1bc09d6a49c026a7e723432d6
443 lines
17 KiB
Go
443 lines
17 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: inspector.proto
|
|
|
|
package internalpb
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
math "math"
|
|
time "time"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
|
|
drpc "storj.io/drpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// 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 StatsRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
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{0}
|
|
}
|
|
func (m *StatsRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_StatsRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *StatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_StatsRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *StatsRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StatsRequest.Merge(m, src)
|
|
}
|
|
func (m *StatsRequest) XXX_Size() int {
|
|
return xxx_messageInfo_StatsRequest.Size(m)
|
|
}
|
|
func (m *StatsRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StatsRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StatsRequest proto.InternalMessageInfo
|
|
|
|
type StatSummaryResponse struct {
|
|
UsedSpace int64 `protobuf:"varint,1,opt,name=used_space,json=usedSpace,proto3" json:"used_space,omitempty"`
|
|
AvailableSpace int64 `protobuf:"varint,2,opt,name=available_space,json=availableSpace,proto3" json:"available_space,omitempty"`
|
|
UsedIngress int64 `protobuf:"varint,3,opt,name=used_ingress,json=usedIngress,proto3" json:"used_ingress,omitempty"`
|
|
UsedEgress int64 `protobuf:"varint,4,opt,name=used_egress,json=usedEgress,proto3" json:"used_egress,omitempty"`
|
|
UsedBandwidth int64 `protobuf:"varint,5,opt,name=used_bandwidth,json=usedBandwidth,proto3" json:"used_bandwidth,omitempty"`
|
|
AvailableBandwidth int64 `protobuf:"varint,6,opt,name=available_bandwidth,json=availableBandwidth,proto3" json:"available_bandwidth,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
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{1}
|
|
}
|
|
func (m *StatSummaryResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_StatSummaryResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *StatSummaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_StatSummaryResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *StatSummaryResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StatSummaryResponse.Merge(m, src)
|
|
}
|
|
func (m *StatSummaryResponse) XXX_Size() int {
|
|
return xxx_messageInfo_StatSummaryResponse.Size(m)
|
|
}
|
|
func (m *StatSummaryResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StatSummaryResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StatSummaryResponse proto.InternalMessageInfo
|
|
|
|
func (m *StatSummaryResponse) GetUsedSpace() int64 {
|
|
if m != nil {
|
|
return m.UsedSpace
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummaryResponse) GetAvailableSpace() int64 {
|
|
if m != nil {
|
|
return m.AvailableSpace
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummaryResponse) GetUsedIngress() int64 {
|
|
if m != nil {
|
|
return m.UsedIngress
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummaryResponse) GetUsedEgress() int64 {
|
|
if m != nil {
|
|
return m.UsedEgress
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummaryResponse) GetUsedBandwidth() int64 {
|
|
if m != nil {
|
|
return m.UsedBandwidth
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StatSummaryResponse) GetAvailableBandwidth() int64 {
|
|
if m != nil {
|
|
return m.AvailableBandwidth
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DashboardRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
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{2}
|
|
}
|
|
func (m *DashboardRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_DashboardRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *DashboardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_DashboardRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *DashboardRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DashboardRequest.Merge(m, src)
|
|
}
|
|
func (m *DashboardRequest) XXX_Size() int {
|
|
return xxx_messageInfo_DashboardRequest.Size(m)
|
|
}
|
|
func (m *DashboardRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DashboardRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DashboardRequest proto.InternalMessageInfo
|
|
|
|
type DashboardResponse struct {
|
|
NodeId NodeID `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3,customtype=NodeID" json:"node_id"`
|
|
NodeConnections int64 `protobuf:"varint,2,opt,name=node_connections,json=nodeConnections,proto3" json:"node_connections,omitempty"`
|
|
BootstrapAddress string `protobuf:"bytes,3,opt,name=bootstrap_address,json=bootstrapAddress,proto3" json:"bootstrap_address,omitempty"` // Deprecated: Do not use.
|
|
InternalAddress string `protobuf:"bytes,4,opt,name=internal_address,json=internalAddress,proto3" json:"internal_address,omitempty"`
|
|
ExternalAddress string `protobuf:"bytes,5,opt,name=external_address,json=externalAddress,proto3" json:"external_address,omitempty"`
|
|
DashboardAddress string `protobuf:"bytes,6,opt,name=dashboard_address,json=dashboardAddress,proto3" json:"dashboard_address,omitempty"`
|
|
Stats *StatSummaryResponse `protobuf:"bytes,7,opt,name=stats,proto3" json:"stats,omitempty"`
|
|
Uptime string `protobuf:"bytes,8,opt,name=uptime,proto3" json:"uptime,omitempty"`
|
|
LastPinged time.Time `protobuf:"bytes,9,opt,name=last_pinged,json=lastPinged,proto3,stdtime" json:"last_pinged"`
|
|
LastQueried time.Time `protobuf:"bytes,10,opt,name=last_queried,json=lastQueried,proto3,stdtime" json:"last_queried"`
|
|
LastPingFromId *NodeID `protobuf:"bytes,11,opt,name=last_ping_from_id,json=lastPingFromId,proto3,customtype=NodeID" json:"last_ping_from_id,omitempty"`
|
|
LastPingFromAddress string `protobuf:"bytes,12,opt,name=last_ping_from_address,json=lastPingFromAddress,proto3" json:"last_ping_from_address,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
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{3}
|
|
}
|
|
func (m *DashboardResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_DashboardResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *DashboardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_DashboardResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *DashboardResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DashboardResponse.Merge(m, src)
|
|
}
|
|
func (m *DashboardResponse) XXX_Size() int {
|
|
return xxx_messageInfo_DashboardResponse.Size(m)
|
|
}
|
|
func (m *DashboardResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DashboardResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DashboardResponse proto.InternalMessageInfo
|
|
|
|
func (m *DashboardResponse) GetNodeConnections() int64 {
|
|
if m != nil {
|
|
return m.NodeConnections
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// Deprecated: Do not use.
|
|
func (m *DashboardResponse) GetBootstrapAddress() string {
|
|
if m != nil {
|
|
return m.BootstrapAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DashboardResponse) GetInternalAddress() string {
|
|
if m != nil {
|
|
return m.InternalAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DashboardResponse) GetExternalAddress() string {
|
|
if m != nil {
|
|
return m.ExternalAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DashboardResponse) GetDashboardAddress() string {
|
|
if m != nil {
|
|
return m.DashboardAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DashboardResponse) GetStats() *StatSummaryResponse {
|
|
if m != nil {
|
|
return m.Stats
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *DashboardResponse) GetUptime() string {
|
|
if m != nil {
|
|
return m.Uptime
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DashboardResponse) GetLastPinged() time.Time {
|
|
if m != nil {
|
|
return m.LastPinged
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *DashboardResponse) GetLastQueried() time.Time {
|
|
if m != nil {
|
|
return m.LastQueried
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *DashboardResponse) GetLastPingFromAddress() string {
|
|
if m != nil {
|
|
return m.LastPingFromAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*StatsRequest)(nil), "inspector.StatsRequest")
|
|
proto.RegisterType((*StatSummaryResponse)(nil), "inspector.StatSummaryResponse")
|
|
proto.RegisterType((*DashboardRequest)(nil), "inspector.DashboardRequest")
|
|
proto.RegisterType((*DashboardResponse)(nil), "inspector.DashboardResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_a07d9034b2dd9d26) }
|
|
|
|
var fileDescriptor_a07d9034b2dd9d26 = []byte{
|
|
// 595 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xcb, 0x6e, 0x13, 0x3f,
|
|
0x14, 0xc6, 0x3b, 0x6d, 0x93, 0x36, 0x27, 0xf9, 0xe7, 0xe2, 0x48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xf8, 0xfd, 0x91, 0xb1,
|
|
0x4a, 0x7f, 0xe8, 0x4b, 0x35, 0xa0, 0x3f, 0xf4, 0xcb, 0x13, 0x74, 0x61, 0x1e, 0xf8, 0xd4, 0x65,
|
|
0x71, 0x5c, 0x26, 0x97, 0xcf, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xbd, 0x86, 0x44, 0xa8,
|
|
0x04, 0x00, 0x00,
|
|
}
|
|
|
|
// --- DRPC BEGIN ---
|
|
|
|
type DRPCPieceStoreInspectorClient interface {
|
|
DRPCConn() drpc.Conn
|
|
|
|
// Stats return space and bandwidth stats for a storagenode
|
|
Stats(ctx context.Context, in *StatsRequest) (*StatSummaryResponse, error)
|
|
// Dashboard returns stats for a specific storagenode
|
|
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, "/inspector.PieceStoreInspector/Stats", 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, "/inspector.PieceStoreInspector/Dashboard", in, out)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
type DRPCPieceStoreInspectorServer interface {
|
|
// Stats return space and bandwidth stats for a storagenode
|
|
Stats(context.Context, *StatsRequest) (*StatSummaryResponse, error)
|
|
// Dashboard returns stats for a specific storagenode
|
|
Dashboard(context.Context, *DashboardRequest) (*DashboardResponse, error)
|
|
}
|
|
|
|
type DRPCPieceStoreInspectorDescription struct{}
|
|
|
|
func (DRPCPieceStoreInspectorDescription) NumMethods() int { return 2 }
|
|
|
|
func (DRPCPieceStoreInspectorDescription) Method(n int) (string, drpc.Receiver, interface{}, bool) {
|
|
switch n {
|
|
case 0:
|
|
return "/inspector.PieceStoreInspector/Stats",
|
|
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 "/inspector.PieceStoreInspector/Dashboard",
|
|
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, false
|
|
}
|
|
}
|
|
|
|
func DRPCRegisterPieceStoreInspector(mux drpc.Mux, impl DRPCPieceStoreInspectorServer) error {
|
|
return mux.Register(impl, DRPCPieceStoreInspectorDescription{})
|
|
}
|
|
|
|
type DRPCPieceStoreInspector_StatsStream interface {
|
|
drpc.Stream
|
|
SendAndClose(*StatSummaryResponse) error
|
|
}
|
|
|
|
type drpcPieceStoreInspectorStatsStream struct {
|
|
drpc.Stream
|
|
}
|
|
|
|
func (x *drpcPieceStoreInspectorStatsStream) SendAndClose(m *StatSummaryResponse) error {
|
|
if err := x.MsgSend(m); err != nil {
|
|
return err
|
|
}
|
|
return x.CloseSend()
|
|
}
|
|
|
|
type DRPCPieceStoreInspector_DashboardStream interface {
|
|
drpc.Stream
|
|
SendAndClose(*DashboardResponse) error
|
|
}
|
|
|
|
type drpcPieceStoreInspectorDashboardStream struct {
|
|
drpc.Stream
|
|
}
|
|
|
|
func (x *drpcPieceStoreInspectorDashboardStream) SendAndClose(m *DashboardResponse) error {
|
|
if err := x.MsgSend(m); err != nil {
|
|
return err
|
|
}
|
|
return x.CloseSend()
|
|
}
|
|
|
|
// --- DRPC END ---
|