convert psserver dashboard into an inspector (#1407)

* Convert psserver dashboard into an inspector

* remove dashboard stream, update ps.pb.mock

* fixes for lint errs
This commit is contained in:
Jess G 2019-03-05 15:48:37 -05:00 committed by GitHub
parent 467fe3f700
commit 3c9d83dbfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 1695 additions and 970 deletions

View File

@ -6,7 +6,6 @@ package main
import (
"context"
"fmt"
"io"
"os"
"os/exec"
"runtime"
@ -23,7 +22,6 @@ import (
"storj.io/storj/pkg/identity"
"storj.io/storj/pkg/pb"
"storj.io/storj/pkg/peertls/tlsopts"
"storj.io/storj/pkg/piecestore/psclient"
"storj.io/storj/pkg/process"
"storj.io/storj/pkg/transport"
)
@ -45,6 +43,7 @@ func dashCmd(cmd *cobra.Command, args []string) (err error) {
tc := transport.NewClient(tlsOpts)
n := &pb.Node{
Id: ident.ID,
Address: &pb.NodeAddress{
Address: dashboardCfg.Address,
Transport: 0,
@ -52,12 +51,7 @@ func dashCmd(cmd *cobra.Command, args []string) (err error) {
Type: pb.NodeType_STORAGE,
}
lc, err := psclient.NewLiteClient(ctx, tc, n)
if err != nil {
return err
}
stream, err := lc.Dashboard(ctx)
client, err := newDashboardClient(ctx, tc, n)
if err != nil {
return err
}
@ -68,11 +62,7 @@ func dashCmd(cmd *cobra.Command, args []string) (err error) {
}
for {
data, err := stream.Recv()
if err == io.EOF {
break
}
data, err := client.Dashboard(ctx)
if err != nil {
return err
}
@ -132,9 +122,35 @@ func dashCmd(cmd *cobra.Command, args []string) (err error) {
if err = w.Flush(); err != nil {
return err
}
time.Sleep(3 * time.Second)
}
}
// DashboardClient is the struct that holds the client
type DashboardClient struct {
client pb.PieceStoreInspectorClient
}
// Dashboard returns a simple terminal dashboard displaying info
func (dash *DashboardClient) Dashboard(ctx context.Context) (*pb.DashboardResponse, error) {
return dash.client.Dashboard(ctx, &pb.DashboardRequest{})
}
// Stats will retrieve stats about a piece storage node
func (dash *DashboardClient) Stats(ctx context.Context) (*pb.StatSummaryResponse, error) {
return dash.client.Stats(ctx, &pb.StatsRequest{})
}
func newDashboardClient(ctx context.Context, tc transport.Client, n *pb.Node) (*DashboardClient, error) {
conn, err := tc.DialNode(ctx, n)
if err != nil {
return &DashboardClient{}, err
}
return nil
return &DashboardClient{
client: pb.NewPieceStoreInspectorClient(conn),
}, nil
}
func whiteInt(value int64) string {

View File

@ -3,14 +3,14 @@
package pb
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import (
context "golang.org/x/net/context"
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -36,7 +36,7 @@ func (m *GetStatsRequest) Reset() { *m = GetStatsRequest{} }
func (m *GetStatsRequest) String() string { return proto.CompactTextString(m) }
func (*GetStatsRequest) ProtoMessage() {}
func (*GetStatsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{0}
return fileDescriptor_a07d9034b2dd9d26, []int{0}
}
func (m *GetStatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetStatsRequest.Unmarshal(m, b)
@ -44,8 +44,8 @@ func (m *GetStatsRequest) XXX_Unmarshal(b []byte) error {
func (m *GetStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetStatsRequest.Marshal(b, m, deterministic)
}
func (dst *GetStatsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetStatsRequest.Merge(dst, src)
func (m *GetStatsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetStatsRequest.Merge(m, src)
}
func (m *GetStatsRequest) XXX_Size() int {
return xxx_messageInfo_GetStatsRequest.Size(m)
@ -70,7 +70,7 @@ func (m *GetStatsResponse) Reset() { *m = GetStatsResponse{} }
func (m *GetStatsResponse) String() string { return proto.CompactTextString(m) }
func (*GetStatsResponse) ProtoMessage() {}
func (*GetStatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{1}
return fileDescriptor_a07d9034b2dd9d26, []int{1}
}
func (m *GetStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetStatsResponse.Unmarshal(m, b)
@ -78,8 +78,8 @@ func (m *GetStatsResponse) XXX_Unmarshal(b []byte) error {
func (m *GetStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetStatsResponse.Marshal(b, m, deterministic)
}
func (dst *GetStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetStatsResponse.Merge(dst, src)
func (m *GetStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetStatsResponse.Merge(m, src)
}
func (m *GetStatsResponse) XXX_Size() int {
return xxx_messageInfo_GetStatsResponse.Size(m)
@ -134,7 +134,7 @@ func (m *CreateStatsRequest) Reset() { *m = CreateStatsRequest{} }
func (m *CreateStatsRequest) String() string { return proto.CompactTextString(m) }
func (*CreateStatsRequest) ProtoMessage() {}
func (*CreateStatsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{2}
return fileDescriptor_a07d9034b2dd9d26, []int{2}
}
func (m *CreateStatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateStatsRequest.Unmarshal(m, b)
@ -142,8 +142,8 @@ func (m *CreateStatsRequest) XXX_Unmarshal(b []byte) error {
func (m *CreateStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateStatsRequest.Marshal(b, m, deterministic)
}
func (dst *CreateStatsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateStatsRequest.Merge(dst, src)
func (m *CreateStatsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateStatsRequest.Merge(m, src)
}
func (m *CreateStatsRequest) XXX_Size() int {
return xxx_messageInfo_CreateStatsRequest.Size(m)
@ -192,7 +192,7 @@ func (m *CreateStatsResponse) Reset() { *m = CreateStatsResponse{} }
func (m *CreateStatsResponse) String() string { return proto.CompactTextString(m) }
func (*CreateStatsResponse) ProtoMessage() {}
func (*CreateStatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{3}
return fileDescriptor_a07d9034b2dd9d26, []int{3}
}
func (m *CreateStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateStatsResponse.Unmarshal(m, b)
@ -200,8 +200,8 @@ func (m *CreateStatsResponse) XXX_Unmarshal(b []byte) error {
func (m *CreateStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateStatsResponse.Marshal(b, m, deterministic)
}
func (dst *CreateStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateStatsResponse.Merge(dst, src)
func (m *CreateStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateStatsResponse.Merge(m, src)
}
func (m *CreateStatsResponse) XXX_Size() int {
return xxx_messageInfo_CreateStatsResponse.Size(m)
@ -224,7 +224,7 @@ func (m *CountNodesResponse) Reset() { *m = CountNodesResponse{} }
func (m *CountNodesResponse) String() string { return proto.CompactTextString(m) }
func (*CountNodesResponse) ProtoMessage() {}
func (*CountNodesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{4}
return fileDescriptor_a07d9034b2dd9d26, []int{4}
}
func (m *CountNodesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CountNodesResponse.Unmarshal(m, b)
@ -232,8 +232,8 @@ func (m *CountNodesResponse) XXX_Unmarshal(b []byte) error {
func (m *CountNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CountNodesResponse.Marshal(b, m, deterministic)
}
func (dst *CountNodesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CountNodesResponse.Merge(dst, src)
func (m *CountNodesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CountNodesResponse.Merge(m, src)
}
func (m *CountNodesResponse) XXX_Size() int {
return xxx_messageInfo_CountNodesResponse.Size(m)
@ -261,7 +261,7 @@ func (m *CountNodesRequest) Reset() { *m = CountNodesRequest{} }
func (m *CountNodesRequest) String() string { return proto.CompactTextString(m) }
func (*CountNodesRequest) ProtoMessage() {}
func (*CountNodesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{5}
return fileDescriptor_a07d9034b2dd9d26, []int{5}
}
func (m *CountNodesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CountNodesRequest.Unmarshal(m, b)
@ -269,8 +269,8 @@ func (m *CountNodesRequest) XXX_Unmarshal(b []byte) error {
func (m *CountNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CountNodesRequest.Marshal(b, m, deterministic)
}
func (dst *CountNodesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CountNodesRequest.Merge(dst, src)
func (m *CountNodesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CountNodesRequest.Merge(m, src)
}
func (m *CountNodesRequest) XXX_Size() int {
return xxx_messageInfo_CountNodesRequest.Size(m)
@ -292,7 +292,7 @@ func (m *GetBucketsRequest) Reset() { *m = GetBucketsRequest{} }
func (m *GetBucketsRequest) String() string { return proto.CompactTextString(m) }
func (*GetBucketsRequest) ProtoMessage() {}
func (*GetBucketsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{6}
return fileDescriptor_a07d9034b2dd9d26, []int{6}
}
func (m *GetBucketsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketsRequest.Unmarshal(m, b)
@ -300,8 +300,8 @@ func (m *GetBucketsRequest) XXX_Unmarshal(b []byte) error {
func (m *GetBucketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBucketsRequest.Marshal(b, m, deterministic)
}
func (dst *GetBucketsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketsRequest.Merge(dst, src)
func (m *GetBucketsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketsRequest.Merge(m, src)
}
func (m *GetBucketsRequest) XXX_Size() int {
return xxx_messageInfo_GetBucketsRequest.Size(m)
@ -324,7 +324,7 @@ func (m *GetBucketsResponse) Reset() { *m = GetBucketsResponse{} }
func (m *GetBucketsResponse) String() string { return proto.CompactTextString(m) }
func (*GetBucketsResponse) ProtoMessage() {}
func (*GetBucketsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{7}
return fileDescriptor_a07d9034b2dd9d26, []int{7}
}
func (m *GetBucketsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketsResponse.Unmarshal(m, b)
@ -332,8 +332,8 @@ func (m *GetBucketsResponse) XXX_Unmarshal(b []byte) error {
func (m *GetBucketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBucketsResponse.Marshal(b, m, deterministic)
}
func (dst *GetBucketsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketsResponse.Merge(dst, src)
func (m *GetBucketsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketsResponse.Merge(m, src)
}
func (m *GetBucketsResponse) XXX_Size() int {
return xxx_messageInfo_GetBucketsResponse.Size(m)
@ -363,7 +363,7 @@ func (m *GetBucketRequest) Reset() { *m = GetBucketRequest{} }
func (m *GetBucketRequest) String() string { return proto.CompactTextString(m) }
func (*GetBucketRequest) ProtoMessage() {}
func (*GetBucketRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{8}
return fileDescriptor_a07d9034b2dd9d26, []int{8}
}
func (m *GetBucketRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketRequest.Unmarshal(m, b)
@ -371,8 +371,8 @@ func (m *GetBucketRequest) XXX_Unmarshal(b []byte) error {
func (m *GetBucketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBucketRequest.Marshal(b, m, deterministic)
}
func (dst *GetBucketRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketRequest.Merge(dst, src)
func (m *GetBucketRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketRequest.Merge(m, src)
}
func (m *GetBucketRequest) XXX_Size() int {
return xxx_messageInfo_GetBucketRequest.Size(m)
@ -395,7 +395,7 @@ func (m *GetBucketResponse) Reset() { *m = GetBucketResponse{} }
func (m *GetBucketResponse) String() string { return proto.CompactTextString(m) }
func (*GetBucketResponse) ProtoMessage() {}
func (*GetBucketResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{9}
return fileDescriptor_a07d9034b2dd9d26, []int{9}
}
func (m *GetBucketResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketResponse.Unmarshal(m, b)
@ -403,8 +403,8 @@ func (m *GetBucketResponse) XXX_Unmarshal(b []byte) error {
func (m *GetBucketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBucketResponse.Marshal(b, m, deterministic)
}
func (dst *GetBucketResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketResponse.Merge(dst, src)
func (m *GetBucketResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBucketResponse.Merge(m, src)
}
func (m *GetBucketResponse) XXX_Size() int {
return xxx_messageInfo_GetBucketResponse.Size(m)
@ -433,7 +433,7 @@ func (m *Bucket) Reset() { *m = Bucket{} }
func (m *Bucket) String() string { return proto.CompactTextString(m) }
func (*Bucket) ProtoMessage() {}
func (*Bucket) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{10}
return fileDescriptor_a07d9034b2dd9d26, []int{10}
}
func (m *Bucket) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Bucket.Unmarshal(m, b)
@ -441,8 +441,8 @@ func (m *Bucket) XXX_Unmarshal(b []byte) error {
func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Bucket.Marshal(b, m, deterministic)
}
func (dst *Bucket) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bucket.Merge(dst, src)
func (m *Bucket) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bucket.Merge(m, src)
}
func (m *Bucket) XXX_Size() int {
return xxx_messageInfo_Bucket.Size(m)
@ -471,7 +471,7 @@ func (m *BucketList) Reset() { *m = BucketList{} }
func (m *BucketList) String() string { return proto.CompactTextString(m) }
func (*BucketList) ProtoMessage() {}
func (*BucketList) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{11}
return fileDescriptor_a07d9034b2dd9d26, []int{11}
}
func (m *BucketList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BucketList.Unmarshal(m, b)
@ -479,8 +479,8 @@ func (m *BucketList) XXX_Unmarshal(b []byte) error {
func (m *BucketList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BucketList.Marshal(b, m, deterministic)
}
func (dst *BucketList) XXX_Merge(src proto.Message) {
xxx_messageInfo_BucketList.Merge(dst, src)
func (m *BucketList) XXX_Merge(src proto.Message) {
xxx_messageInfo_BucketList.Merge(m, src)
}
func (m *BucketList) XXX_Size() int {
return xxx_messageInfo_BucketList.Size(m)
@ -511,7 +511,7 @@ func (m *PingNodeRequest) Reset() { *m = PingNodeRequest{} }
func (m *PingNodeRequest) String() string { return proto.CompactTextString(m) }
func (*PingNodeRequest) ProtoMessage() {}
func (*PingNodeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{12}
return fileDescriptor_a07d9034b2dd9d26, []int{12}
}
func (m *PingNodeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PingNodeRequest.Unmarshal(m, b)
@ -519,8 +519,8 @@ func (m *PingNodeRequest) XXX_Unmarshal(b []byte) error {
func (m *PingNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PingNodeRequest.Marshal(b, m, deterministic)
}
func (dst *PingNodeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PingNodeRequest.Merge(dst, src)
func (m *PingNodeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PingNodeRequest.Merge(m, src)
}
func (m *PingNodeRequest) XXX_Size() int {
return xxx_messageInfo_PingNodeRequest.Size(m)
@ -549,7 +549,7 @@ func (m *PingNodeResponse) Reset() { *m = PingNodeResponse{} }
func (m *PingNodeResponse) String() string { return proto.CompactTextString(m) }
func (*PingNodeResponse) ProtoMessage() {}
func (*PingNodeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{13}
return fileDescriptor_a07d9034b2dd9d26, []int{13}
}
func (m *PingNodeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PingNodeResponse.Unmarshal(m, b)
@ -557,8 +557,8 @@ func (m *PingNodeResponse) XXX_Unmarshal(b []byte) error {
func (m *PingNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PingNodeResponse.Marshal(b, m, deterministic)
}
func (dst *PingNodeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PingNodeResponse.Merge(dst, src)
func (m *PingNodeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PingNodeResponse.Merge(m, src)
}
func (m *PingNodeResponse) XXX_Size() int {
return xxx_messageInfo_PingNodeResponse.Size(m)
@ -588,7 +588,7 @@ func (m *LookupNodeRequest) Reset() { *m = LookupNodeRequest{} }
func (m *LookupNodeRequest) String() string { return proto.CompactTextString(m) }
func (*LookupNodeRequest) ProtoMessage() {}
func (*LookupNodeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{14}
return fileDescriptor_a07d9034b2dd9d26, []int{14}
}
func (m *LookupNodeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupNodeRequest.Unmarshal(m, b)
@ -596,8 +596,8 @@ func (m *LookupNodeRequest) XXX_Unmarshal(b []byte) error {
func (m *LookupNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LookupNodeRequest.Marshal(b, m, deterministic)
}
func (dst *LookupNodeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LookupNodeRequest.Merge(dst, src)
func (m *LookupNodeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LookupNodeRequest.Merge(m, src)
}
func (m *LookupNodeRequest) XXX_Size() int {
return xxx_messageInfo_LookupNodeRequest.Size(m)
@ -634,7 +634,7 @@ func (m *LookupNodeResponse) Reset() { *m = LookupNodeResponse{} }
func (m *LookupNodeResponse) String() string { return proto.CompactTextString(m) }
func (*LookupNodeResponse) ProtoMessage() {}
func (*LookupNodeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{15}
return fileDescriptor_a07d9034b2dd9d26, []int{15}
}
func (m *LookupNodeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupNodeResponse.Unmarshal(m, b)
@ -642,8 +642,8 @@ func (m *LookupNodeResponse) XXX_Unmarshal(b []byte) error {
func (m *LookupNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LookupNodeResponse.Marshal(b, m, deterministic)
}
func (dst *LookupNodeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_LookupNodeResponse.Merge(dst, src)
func (m *LookupNodeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_LookupNodeResponse.Merge(m, src)
}
func (m *LookupNodeResponse) XXX_Size() int {
return xxx_messageInfo_LookupNodeResponse.Size(m)
@ -680,7 +680,7 @@ func (m *NodeInfoRequest) Reset() { *m = NodeInfoRequest{} }
func (m *NodeInfoRequest) String() string { return proto.CompactTextString(m) }
func (*NodeInfoRequest) ProtoMessage() {}
func (*NodeInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{16}
return fileDescriptor_a07d9034b2dd9d26, []int{16}
}
func (m *NodeInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeInfoRequest.Unmarshal(m, b)
@ -688,8 +688,8 @@ func (m *NodeInfoRequest) XXX_Unmarshal(b []byte) error {
func (m *NodeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NodeInfoRequest.Marshal(b, m, deterministic)
}
func (dst *NodeInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeInfoRequest.Merge(dst, src)
func (m *NodeInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeInfoRequest.Merge(m, src)
}
func (m *NodeInfoRequest) XXX_Size() int {
return xxx_messageInfo_NodeInfoRequest.Size(m)
@ -720,7 +720,7 @@ func (m *NodeInfoResponse) Reset() { *m = NodeInfoResponse{} }
func (m *NodeInfoResponse) String() string { return proto.CompactTextString(m) }
func (*NodeInfoResponse) ProtoMessage() {}
func (*NodeInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{17}
return fileDescriptor_a07d9034b2dd9d26, []int{17}
}
func (m *NodeInfoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeInfoResponse.Unmarshal(m, b)
@ -728,8 +728,8 @@ func (m *NodeInfoResponse) XXX_Unmarshal(b []byte) error {
func (m *NodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NodeInfoResponse.Marshal(b, m, deterministic)
}
func (dst *NodeInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeInfoResponse.Merge(dst, src)
func (m *NodeInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeInfoResponse.Merge(m, src)
}
func (m *NodeInfoResponse) XXX_Size() int {
return xxx_messageInfo_NodeInfoResponse.Size(m)
@ -774,7 +774,7 @@ func (m *FindNearRequest) Reset() { *m = FindNearRequest{} }
func (m *FindNearRequest) String() string { return proto.CompactTextString(m) }
func (*FindNearRequest) ProtoMessage() {}
func (*FindNearRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{18}
return fileDescriptor_a07d9034b2dd9d26, []int{18}
}
func (m *FindNearRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FindNearRequest.Unmarshal(m, b)
@ -782,8 +782,8 @@ func (m *FindNearRequest) XXX_Unmarshal(b []byte) error {
func (m *FindNearRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FindNearRequest.Marshal(b, m, deterministic)
}
func (dst *FindNearRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_FindNearRequest.Merge(dst, src)
func (m *FindNearRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_FindNearRequest.Merge(m, src)
}
func (m *FindNearRequest) XXX_Size() int {
return xxx_messageInfo_FindNearRequest.Size(m)
@ -812,7 +812,7 @@ func (m *FindNearResponse) Reset() { *m = FindNearResponse{} }
func (m *FindNearResponse) String() string { return proto.CompactTextString(m) }
func (*FindNearResponse) ProtoMessage() {}
func (*FindNearResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{19}
return fileDescriptor_a07d9034b2dd9d26, []int{19}
}
func (m *FindNearResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FindNearResponse.Unmarshal(m, b)
@ -820,8 +820,8 @@ func (m *FindNearResponse) XXX_Unmarshal(b []byte) error {
func (m *FindNearResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FindNearResponse.Marshal(b, m, deterministic)
}
func (dst *FindNearResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_FindNearResponse.Merge(dst, src)
func (m *FindNearResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_FindNearResponse.Merge(m, src)
}
func (m *FindNearResponse) XXX_Size() int {
return xxx_messageInfo_FindNearResponse.Size(m)
@ -849,7 +849,7 @@ func (m *DumpNodesRequest) Reset() { *m = DumpNodesRequest{} }
func (m *DumpNodesRequest) String() string { return proto.CompactTextString(m) }
func (*DumpNodesRequest) ProtoMessage() {}
func (*DumpNodesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{20}
return fileDescriptor_a07d9034b2dd9d26, []int{20}
}
func (m *DumpNodesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DumpNodesRequest.Unmarshal(m, b)
@ -857,8 +857,8 @@ func (m *DumpNodesRequest) XXX_Unmarshal(b []byte) error {
func (m *DumpNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DumpNodesRequest.Marshal(b, m, deterministic)
}
func (dst *DumpNodesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DumpNodesRequest.Merge(dst, src)
func (m *DumpNodesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DumpNodesRequest.Merge(m, src)
}
func (m *DumpNodesRequest) XXX_Size() int {
return xxx_messageInfo_DumpNodesRequest.Size(m)
@ -880,7 +880,7 @@ func (m *DumpNodesResponse) Reset() { *m = DumpNodesResponse{} }
func (m *DumpNodesResponse) String() string { return proto.CompactTextString(m) }
func (*DumpNodesResponse) ProtoMessage() {}
func (*DumpNodesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_inspector_81d06e7abc752c0e, []int{21}
return fileDescriptor_a07d9034b2dd9d26, []int{21}
}
func (m *DumpNodesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DumpNodesResponse.Unmarshal(m, b)
@ -888,8 +888,8 @@ func (m *DumpNodesResponse) XXX_Unmarshal(b []byte) error {
func (m *DumpNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DumpNodesResponse.Marshal(b, m, deterministic)
}
func (dst *DumpNodesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DumpNodesResponse.Merge(dst, src)
func (m *DumpNodesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DumpNodesResponse.Merge(m, src)
}
func (m *DumpNodesResponse) XXX_Size() int {
return xxx_messageInfo_DumpNodesResponse.Size(m)
@ -907,6 +907,222 @@ func (m *DumpNodesResponse) GetNodes() []*Node {
return nil
}
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{22}
}
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"`
UsedBandwidth int64 `protobuf:"varint,3,opt,name=used_bandwidth,json=usedBandwidth,proto3" json:"used_bandwidth,omitempty"`
AvailableBandwidth int64 `protobuf:"varint,4,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{23}
}
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) 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{24}
}
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 string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
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"`
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"`
Stats *StatSummaryResponse `protobuf:"bytes,6,opt,name=stats,proto3" json:"stats,omitempty"`
Connection bool `protobuf:"varint,7,opt,name=connection,proto3" json:"connection,omitempty"`
Uptime *duration.Duration `protobuf:"bytes,8,opt,name=uptime,proto3" json:"uptime,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{25}
}
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) GetNodeId() string {
if m != nil {
return m.NodeId
}
return ""
}
func (m *DashboardResponse) GetNodeConnections() int64 {
if m != nil {
return m.NodeConnections
}
return 0
}
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) GetStats() *StatSummaryResponse {
if m != nil {
return m.Stats
}
return nil
}
func (m *DashboardResponse) GetConnection() bool {
if m != nil {
return m.Connection
}
return false
}
func (m *DashboardResponse) GetUptime() *duration.Duration {
if m != nil {
return m.Uptime
}
return nil
}
func init() {
proto.RegisterType((*GetStatsRequest)(nil), "inspector.GetStatsRequest")
proto.RegisterType((*GetStatsResponse)(nil), "inspector.GetStatsResponse")
@ -930,6 +1146,85 @@ func init() {
proto.RegisterType((*FindNearResponse)(nil), "inspector.FindNearResponse")
proto.RegisterType((*DumpNodesRequest)(nil), "inspector.DumpNodesRequest")
proto.RegisterType((*DumpNodesResponse)(nil), "inspector.DumpNodesResponse")
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{
// 1099 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0xce, 0xfa, 0x2f, 0xf6, 0x71, 0xf0, 0xcf, 0xb8, 0xa8, 0xc6, 0xa4, 0x49, 0x18, 0x01, 0x0d,
0xad, 0xe4, 0x80, 0x29, 0x37, 0x48, 0x5c, 0x60, 0x47, 0x6d, 0xa3, 0x86, 0xb6, 0xda, 0xc0, 0x0d,
0x42, 0x44, 0xe3, 0xdd, 0xa9, 0xbb, 0x8a, 0xbd, 0xb3, 0xec, 0xce, 0x16, 0xfc, 0x22, 0x5c, 0x70,
0x0b, 0x3c, 0x02, 0x57, 0xbc, 0x00, 0xcf, 0xc0, 0x45, 0x6f, 0xfa, 0x22, 0x68, 0x7e, 0x76, 0x67,
0x7f, 0x6c, 0x25, 0x42, 0x70, 0xb7, 0xfb, 0x9d, 0x6f, 0xbe, 0x39, 0xe7, 0xcc, 0xcc, 0x37, 0x03,
0x5d, 0xcf, 0x8f, 0x02, 0xea, 0x70, 0x16, 0x8e, 0x83, 0x90, 0x71, 0x86, 0x5a, 0x29, 0x30, 0x82,
0x05, 0x5b, 0x30, 0x05, 0x8f, 0xc0, 0x67, 0x2e, 0xd5, 0xdf, 0x07, 0x0b, 0xc6, 0x16, 0x4b, 0x7a,
0x22, 0xff, 0xe6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5, 0x0d, 0x07,
0x18, 0xef, 0xa0, 0xc7, 0xd0, 0x4a, 0xdd, 0x2c, 0xdf, 0xca, 0x82, 0xf1, 0xe5, 0x5b, 0x59, 0x34,
0x40, 0xbc, 0x33, 0xad, 0x7d, 0x5b, 0x09, 0xe6, 0xf3, 0x86, 0x3c, 0xd3, 0x9f, 0xfe, 0x13, 0x00,
0x00, 0xff, 0xff, 0x42, 0x61, 0x39, 0x7c, 0xab, 0x0c, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1383,59 +1678,103 @@ var _StatDBInspector_serviceDesc = grpc.ServiceDesc{
Metadata: "inspector.proto",
}
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_inspector_81d06e7abc752c0e) }
var fileDescriptor_inspector_81d06e7abc752c0e = []byte{
// 806 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcb, 0x6e, 0xd3, 0x4c,
0x14, 0xfe, 0xed, 0x5c, 0x9a, 0x9c, 0x44, 0xb9, 0x4c, 0xfb, 0x4b, 0x51, 0x28, 0x6d, 0x18, 0x21,
0xa8, 0x8a, 0x14, 0xa1, 0x00, 0x1b, 0x24, 0x16, 0x24, 0x55, 0x4b, 0xd4, 0xd2, 0x22, 0x17, 0x36,
0x08, 0x51, 0x4d, 0xe3, 0xa1, 0xb2, 0xd2, 0x64, 0x8c, 0x3d, 0x46, 0xca, 0x8b, 0xb0, 0x60, 0x0d,
0x4f, 0xc1, 0x0b, 0xf0, 0x0c, 0x2c, 0xba, 0xe1, 0x45, 0x90, 0x67, 0x6c, 0x8f, 0xc7, 0x6e, 0xd4,
0x08, 0xc1, 0xce, 0x3e, 0xdf, 0x37, 0xdf, 0xb9, 0xce, 0x05, 0x9a, 0xce, 0xdc, 0x77, 0xe9, 0x84,
0x33, 0xaf, 0xef, 0x7a, 0x8c, 0x33, 0x54, 0x4d, 0x0c, 0x5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 0xa0, 0x6e, 0x8a, 0x9a, 0xd9, 0x67, 0xdd, 0x5b, 0xd7, 0x62, 0x91, 0xc8,
0x18, 0x40, 0xcd, 0xb9, 0x16, 0x4f, 0x6e, 0xf7, 0x68, 0xf1, 0x5c, 0xb3, 0x39, 0x46, 0x50, 0x89,
0x67, 0x4e, 0x8b, 0x27, 0x33, 0xe9, 0x5a, 0x3c, 0xb9, 0x21, 0x1d, 0x41, 0x25, 0xee, 0x98, 0x26,
0x92, 0x99, 0x1a, 0x4d, 0x24, 0xd7, 0xe2, 0x7d, 0xa8, 0x26, 0xcd, 0x42, 0x69, 0x66, 0xb6, 0xad,
0xdd, 0xcd, 0xeb, 0x41, 0xa9, 0x33, 0xf8, 0x66, 0x40, 0xeb, 0xe4, 0x13, 0xf5, 0x2e, 0xc9, 0xe2,
0x9f, 0x74, 0xf0, 0x6f, 0xc5, 0xf9, 0xd5, 0x80, 0x66, 0x78, 0xeb, 0xed, 0x0d, 0x55, 0x98, 0x23,
0xa8, 0xc4, 0x0f, 0x12, 0xad, 0x90, 0x99, 0x27, 0x8e, 0x56, 0xc8, 0xdc, 0x0b, 0xe6, 0x08, 0x6a,
0xa9, 0x3b, 0x15, 0x69, 0xe9, 0xe4, 0x1e, 0x14, 0xdd, 0xad, 0x65, 0xb0, 0x54, 0x1b, 0x16, 0xdf,
0x9a, 0xee, 0xf9, 0x79, 0x59, 0xbc, 0xb6, 0x1e, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x78, 0xda,
0x58, 0x3e, 0xa3, 0x09, 0x00, 0x00,
// PieceStoreInspectorClient is the client API for PieceStoreInspector service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PieceStoreInspectorClient interface {
// Stats return space and bandwidth stats for a storagenode
Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatSummaryResponse, error)
// Dashboard returns stats for a specific storagenode
Dashboard(ctx context.Context, in *DashboardRequest, opts ...grpc.CallOption) (*DashboardResponse, error)
}
type pieceStoreInspectorClient struct {
cc *grpc.ClientConn
}
func NewPieceStoreInspectorClient(cc *grpc.ClientConn) PieceStoreInspectorClient {
return &pieceStoreInspectorClient{cc}
}
func (c *pieceStoreInspectorClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatSummaryResponse, error) {
out := new(StatSummaryResponse)
err := c.cc.Invoke(ctx, "/inspector.PieceStoreInspector/Stats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pieceStoreInspectorClient) Dashboard(ctx context.Context, in *DashboardRequest, opts ...grpc.CallOption) (*DashboardResponse, error) {
out := new(DashboardResponse)
err := c.cc.Invoke(ctx, "/inspector.PieceStoreInspector/Dashboard", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PieceStoreInspectorServer is the server API for PieceStoreInspector service.
type PieceStoreInspectorServer 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)
}
func RegisterPieceStoreInspectorServer(s *grpc.Server, srv PieceStoreInspectorServer) {
s.RegisterService(&_PieceStoreInspector_serviceDesc, srv)
}
func _PieceStoreInspector_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PieceStoreInspectorServer).Stats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/inspector.PieceStoreInspector/Stats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PieceStoreInspectorServer).Stats(ctx, req.(*StatsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PieceStoreInspector_Dashboard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DashboardRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PieceStoreInspectorServer).Dashboard(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/inspector.PieceStoreInspector/Dashboard",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PieceStoreInspectorServer).Dashboard(ctx, req.(*DashboardRequest))
}
return interceptor(ctx, in, info, handler)
}
var _PieceStoreInspector_serviceDesc = grpc.ServiceDesc{
ServiceName: "inspector.PieceStoreInspector",
HandlerType: (*PieceStoreInspectorServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Stats",
Handler: _PieceStoreInspector_Stats_Handler,
},
{
MethodName: "Dashboard",
Handler: _PieceStoreInspector_Dashboard_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "inspector.proto",
}

View File

@ -6,6 +6,8 @@ option go_package = "pb";
import "gogo.proto";
import "node.proto";
import "google/protobuf/duration.proto";
package inspector;
@ -38,6 +40,13 @@ service StatDBInspector {
rpc CreateStats(CreateStatsRequest) returns (CreateStatsResponse);
}
service PieceStoreInspector {
// Stats return space and bandwidth stats for a storagenode
rpc Stats(StatsRequest) returns (StatSummaryResponse) {}
// Dashboard returns stats for a specific storagenode
rpc Dashboard(DashboardRequest) returns (DashboardResponse) {}
}
// GetStats
message GetStatsRequest {
bytes node_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
@ -141,4 +150,27 @@ message DumpNodesRequest {}
message DumpNodesResponse {
repeated node.Node nodes = 1;
}
}
message StatsRequest {
}
message StatSummaryResponse {
int64 used_space = 1;
int64 available_space = 2;
int64 used_bandwidth = 3;
int64 available_bandwidth = 4;
}
message DashboardRequest {
}
message DashboardResponse {
string node_id = 1;
int64 node_connections = 2;
string bootstrap_address = 3;
string internal_address = 4;
string external_address = 5;
StatSummaryResponse stats = 6;
bool connection = 7;
google.protobuf.Duration uptime = 8;
}

View File

@ -3,15 +3,14 @@
package pb
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import duration "github.com/golang/protobuf/ptypes/duration"
import (
context "golang.org/x/net/context"
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/duration"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -42,6 +41,7 @@ var BandwidthAction_name = map[int32]string{
3: "GET_REPAIR",
4: "PUT_REPAIR",
}
var BandwidthAction_value = map[string]int32{
"PUT": 0,
"GET": 1,
@ -53,8 +53,9 @@ var BandwidthAction_value = map[string]int32{
func (x BandwidthAction) String() string {
return proto.EnumName(BandwidthAction_name, int32(x))
}
func (BandwidthAction) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{0}
return fileDescriptor_569d535d76469daf, []int{0}
}
type PayerBandwidthAllocation struct {
@ -76,7 +77,7 @@ func (m *PayerBandwidthAllocation) Reset() { *m = PayerBandwidthAllocati
func (m *PayerBandwidthAllocation) String() string { return proto.CompactTextString(m) }
func (*PayerBandwidthAllocation) ProtoMessage() {}
func (*PayerBandwidthAllocation) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{0}
return fileDescriptor_569d535d76469daf, []int{0}
}
func (m *PayerBandwidthAllocation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PayerBandwidthAllocation.Unmarshal(m, b)
@ -84,8 +85,8 @@ func (m *PayerBandwidthAllocation) XXX_Unmarshal(b []byte) error {
func (m *PayerBandwidthAllocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PayerBandwidthAllocation.Marshal(b, m, deterministic)
}
func (dst *PayerBandwidthAllocation) XXX_Merge(src proto.Message) {
xxx_messageInfo_PayerBandwidthAllocation.Merge(dst, src)
func (m *PayerBandwidthAllocation) XXX_Merge(src proto.Message) {
xxx_messageInfo_PayerBandwidthAllocation.Merge(m, src)
}
func (m *PayerBandwidthAllocation) XXX_Size() int {
return xxx_messageInfo_PayerBandwidthAllocation.Size(m)
@ -160,7 +161,7 @@ func (m *RenterBandwidthAllocation) Reset() { *m = RenterBandwidthAlloca
func (m *RenterBandwidthAllocation) String() string { return proto.CompactTextString(m) }
func (*RenterBandwidthAllocation) ProtoMessage() {}
func (*RenterBandwidthAllocation) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{1}
return fileDescriptor_569d535d76469daf, []int{1}
}
func (m *RenterBandwidthAllocation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RenterBandwidthAllocation.Unmarshal(m, b)
@ -168,8 +169,8 @@ func (m *RenterBandwidthAllocation) XXX_Unmarshal(b []byte) error {
func (m *RenterBandwidthAllocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RenterBandwidthAllocation.Marshal(b, m, deterministic)
}
func (dst *RenterBandwidthAllocation) XXX_Merge(src proto.Message) {
xxx_messageInfo_RenterBandwidthAllocation.Merge(dst, src)
func (m *RenterBandwidthAllocation) XXX_Merge(src proto.Message) {
xxx_messageInfo_RenterBandwidthAllocation.Merge(m, src)
}
func (m *RenterBandwidthAllocation) XXX_Size() int {
return xxx_messageInfo_RenterBandwidthAllocation.Size(m)
@ -222,7 +223,7 @@ func (m *PieceStore) Reset() { *m = PieceStore{} }
func (m *PieceStore) String() string { return proto.CompactTextString(m) }
func (*PieceStore) ProtoMessage() {}
func (*PieceStore) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{2}
return fileDescriptor_569d535d76469daf, []int{2}
}
func (m *PieceStore) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceStore.Unmarshal(m, b)
@ -230,8 +231,8 @@ func (m *PieceStore) XXX_Unmarshal(b []byte) error {
func (m *PieceStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceStore.Marshal(b, m, deterministic)
}
func (dst *PieceStore) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceStore.Merge(dst, src)
func (m *PieceStore) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceStore.Merge(m, src)
}
func (m *PieceStore) XXX_Size() int {
return xxx_messageInfo_PieceStore.Size(m)
@ -285,7 +286,7 @@ func (m *PieceStore_PieceData) Reset() { *m = PieceStore_PieceData{} }
func (m *PieceStore_PieceData) String() string { return proto.CompactTextString(m) }
func (*PieceStore_PieceData) ProtoMessage() {}
func (*PieceStore_PieceData) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{2, 0}
return fileDescriptor_569d535d76469daf, []int{2, 0}
}
func (m *PieceStore_PieceData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceStore_PieceData.Unmarshal(m, b)
@ -293,8 +294,8 @@ func (m *PieceStore_PieceData) XXX_Unmarshal(b []byte) error {
func (m *PieceStore_PieceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceStore_PieceData.Marshal(b, m, deterministic)
}
func (dst *PieceStore_PieceData) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceStore_PieceData.Merge(dst, src)
func (m *PieceStore_PieceData) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceStore_PieceData.Merge(m, src)
}
func (m *PieceStore_PieceData) XXX_Size() int {
return xxx_messageInfo_PieceStore_PieceData.Size(m)
@ -340,7 +341,7 @@ func (m *PieceId) Reset() { *m = PieceId{} }
func (m *PieceId) String() string { return proto.CompactTextString(m) }
func (*PieceId) ProtoMessage() {}
func (*PieceId) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{3}
return fileDescriptor_569d535d76469daf, []int{3}
}
func (m *PieceId) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceId.Unmarshal(m, b)
@ -348,8 +349,8 @@ func (m *PieceId) XXX_Unmarshal(b []byte) error {
func (m *PieceId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceId.Marshal(b, m, deterministic)
}
func (dst *PieceId) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceId.Merge(dst, src)
func (m *PieceId) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceId.Merge(m, src)
}
func (m *PieceId) XXX_Size() int {
return xxx_messageInfo_PieceId.Size(m)
@ -388,7 +389,7 @@ func (m *PieceSummary) Reset() { *m = PieceSummary{} }
func (m *PieceSummary) String() string { return proto.CompactTextString(m) }
func (*PieceSummary) ProtoMessage() {}
func (*PieceSummary) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{4}
return fileDescriptor_569d535d76469daf, []int{4}
}
func (m *PieceSummary) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceSummary.Unmarshal(m, b)
@ -396,8 +397,8 @@ func (m *PieceSummary) XXX_Unmarshal(b []byte) error {
func (m *PieceSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceSummary.Marshal(b, m, deterministic)
}
func (dst *PieceSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceSummary.Merge(dst, src)
func (m *PieceSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceSummary.Merge(m, src)
}
func (m *PieceSummary) XXX_Size() int {
return xxx_messageInfo_PieceSummary.Size(m)
@ -442,7 +443,7 @@ func (m *PieceRetrieval) Reset() { *m = PieceRetrieval{} }
func (m *PieceRetrieval) String() string { return proto.CompactTextString(m) }
func (*PieceRetrieval) ProtoMessage() {}
func (*PieceRetrieval) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{5}
return fileDescriptor_569d535d76469daf, []int{5}
}
func (m *PieceRetrieval) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceRetrieval.Unmarshal(m, b)
@ -450,8 +451,8 @@ func (m *PieceRetrieval) XXX_Unmarshal(b []byte) error {
func (m *PieceRetrieval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceRetrieval.Marshal(b, m, deterministic)
}
func (dst *PieceRetrieval) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceRetrieval.Merge(dst, src)
func (m *PieceRetrieval) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceRetrieval.Merge(m, src)
}
func (m *PieceRetrieval) XXX_Size() int {
return xxx_messageInfo_PieceRetrieval.Size(m)
@ -498,7 +499,7 @@ func (m *PieceRetrieval_PieceData) Reset() { *m = PieceRetrieval_PieceDa
func (m *PieceRetrieval_PieceData) String() string { return proto.CompactTextString(m) }
func (*PieceRetrieval_PieceData) ProtoMessage() {}
func (*PieceRetrieval_PieceData) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{5, 0}
return fileDescriptor_569d535d76469daf, []int{5, 0}
}
func (m *PieceRetrieval_PieceData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceRetrieval_PieceData.Unmarshal(m, b)
@ -506,8 +507,8 @@ func (m *PieceRetrieval_PieceData) XXX_Unmarshal(b []byte) error {
func (m *PieceRetrieval_PieceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceRetrieval_PieceData.Marshal(b, m, deterministic)
}
func (dst *PieceRetrieval_PieceData) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceRetrieval_PieceData.Merge(dst, src)
func (m *PieceRetrieval_PieceData) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceRetrieval_PieceData.Merge(m, src)
}
func (m *PieceRetrieval_PieceData) XXX_Size() int {
return xxx_messageInfo_PieceRetrieval_PieceData.Size(m)
@ -551,7 +552,7 @@ func (m *PieceRetrievalStream) Reset() { *m = PieceRetrievalStream{} }
func (m *PieceRetrievalStream) String() string { return proto.CompactTextString(m) }
func (*PieceRetrievalStream) ProtoMessage() {}
func (*PieceRetrievalStream) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{6}
return fileDescriptor_569d535d76469daf, []int{6}
}
func (m *PieceRetrievalStream) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceRetrievalStream.Unmarshal(m, b)
@ -559,8 +560,8 @@ func (m *PieceRetrievalStream) XXX_Unmarshal(b []byte) error {
func (m *PieceRetrievalStream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceRetrievalStream.Marshal(b, m, deterministic)
}
func (dst *PieceRetrievalStream) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceRetrievalStream.Merge(dst, src)
func (m *PieceRetrievalStream) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceRetrievalStream.Merge(m, src)
}
func (m *PieceRetrievalStream) XXX_Size() int {
return xxx_messageInfo_PieceRetrievalStream.Size(m)
@ -599,7 +600,7 @@ func (m *PieceDelete) Reset() { *m = PieceDelete{} }
func (m *PieceDelete) String() string { return proto.CompactTextString(m) }
func (*PieceDelete) ProtoMessage() {}
func (*PieceDelete) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{7}
return fileDescriptor_569d535d76469daf, []int{7}
}
func (m *PieceDelete) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDelete.Unmarshal(m, b)
@ -607,8 +608,8 @@ func (m *PieceDelete) XXX_Unmarshal(b []byte) error {
func (m *PieceDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDelete.Marshal(b, m, deterministic)
}
func (dst *PieceDelete) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDelete.Merge(dst, src)
func (m *PieceDelete) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDelete.Merge(m, src)
}
func (m *PieceDelete) XXX_Size() int {
return xxx_messageInfo_PieceDelete.Size(m)
@ -645,7 +646,7 @@ func (m *PieceDeleteSummary) Reset() { *m = PieceDeleteSummary{} }
func (m *PieceDeleteSummary) String() string { return proto.CompactTextString(m) }
func (*PieceDeleteSummary) ProtoMessage() {}
func (*PieceDeleteSummary) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{8}
return fileDescriptor_569d535d76469daf, []int{8}
}
func (m *PieceDeleteSummary) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceDeleteSummary.Unmarshal(m, b)
@ -653,8 +654,8 @@ func (m *PieceDeleteSummary) XXX_Unmarshal(b []byte) error {
func (m *PieceDeleteSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceDeleteSummary.Marshal(b, m, deterministic)
}
func (dst *PieceDeleteSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDeleteSummary.Merge(dst, src)
func (m *PieceDeleteSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceDeleteSummary.Merge(m, src)
}
func (m *PieceDeleteSummary) XXX_Size() int {
return xxx_messageInfo_PieceDeleteSummary.Size(m)
@ -685,7 +686,7 @@ func (m *PieceStoreSummary) Reset() { *m = PieceStoreSummary{} }
func (m *PieceStoreSummary) String() string { return proto.CompactTextString(m) }
func (*PieceStoreSummary) ProtoMessage() {}
func (*PieceStoreSummary) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{9}
return fileDescriptor_569d535d76469daf, []int{9}
}
func (m *PieceStoreSummary) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PieceStoreSummary.Unmarshal(m, b)
@ -693,8 +694,8 @@ func (m *PieceStoreSummary) XXX_Unmarshal(b []byte) error {
func (m *PieceStoreSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PieceStoreSummary.Marshal(b, m, deterministic)
}
func (dst *PieceStoreSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceStoreSummary.Merge(dst, src)
func (m *PieceStoreSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_PieceStoreSummary.Merge(m, src)
}
func (m *PieceStoreSummary) XXX_Size() int {
return xxx_messageInfo_PieceStoreSummary.Size(m)
@ -726,98 +727,6 @@ func (m *PieceStoreSummary) GetSignedHash() *SignedHash {
return nil
}
type StatsReq struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatsReq) Reset() { *m = StatsReq{} }
func (m *StatsReq) String() string { return proto.CompactTextString(m) }
func (*StatsReq) ProtoMessage() {}
func (*StatsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{10}
}
func (m *StatsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatsReq.Unmarshal(m, b)
}
func (m *StatsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatsReq.Marshal(b, m, deterministic)
}
func (dst *StatsReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatsReq.Merge(dst, src)
}
func (m *StatsReq) XXX_Size() int {
return xxx_messageInfo_StatsReq.Size(m)
}
func (m *StatsReq) XXX_DiscardUnknown() {
xxx_messageInfo_StatsReq.DiscardUnknown(m)
}
var xxx_messageInfo_StatsReq proto.InternalMessageInfo
type StatSummary 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"`
UsedBandwidth int64 `protobuf:"varint,3,opt,name=used_bandwidth,json=usedBandwidth,proto3" json:"used_bandwidth,omitempty"`
AvailableBandwidth int64 `protobuf:"varint,4,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 *StatSummary) Reset() { *m = StatSummary{} }
func (m *StatSummary) String() string { return proto.CompactTextString(m) }
func (*StatSummary) ProtoMessage() {}
func (*StatSummary) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{11}
}
func (m *StatSummary) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatSummary.Unmarshal(m, b)
}
func (m *StatSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatSummary.Marshal(b, m, deterministic)
}
func (dst *StatSummary) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatSummary.Merge(dst, src)
}
func (m *StatSummary) XXX_Size() int {
return xxx_messageInfo_StatSummary.Size(m)
}
func (m *StatSummary) XXX_DiscardUnknown() {
xxx_messageInfo_StatSummary.DiscardUnknown(m)
}
var xxx_messageInfo_StatSummary proto.InternalMessageInfo
func (m *StatSummary) GetUsedSpace() int64 {
if m != nil {
return m.UsedSpace
}
return 0
}
func (m *StatSummary) GetAvailableSpace() int64 {
if m != nil {
return m.AvailableSpace
}
return 0
}
func (m *StatSummary) GetUsedBandwidth() int64 {
if m != nil {
return m.UsedBandwidth
}
return 0
}
func (m *StatSummary) GetAvailableBandwidth() int64 {
if m != nil {
return m.AvailableBandwidth
}
return 0
}
type SignedMessage struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
@ -831,7 +740,7 @@ func (m *SignedMessage) Reset() { *m = SignedMessage{} }
func (m *SignedMessage) String() string { return proto.CompactTextString(m) }
func (*SignedMessage) ProtoMessage() {}
func (*SignedMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{12}
return fileDescriptor_569d535d76469daf, []int{10}
}
func (m *SignedMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignedMessage.Unmarshal(m, b)
@ -839,8 +748,8 @@ func (m *SignedMessage) XXX_Unmarshal(b []byte) error {
func (m *SignedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignedMessage.Marshal(b, m, deterministic)
}
func (dst *SignedMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignedMessage.Merge(dst, src)
func (m *SignedMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignedMessage.Merge(m, src)
}
func (m *SignedMessage) XXX_Size() int {
return xxx_messageInfo_SignedMessage.Size(m)
@ -872,130 +781,6 @@ func (m *SignedMessage) GetPublicKey() []byte {
return nil
}
type DashboardReq struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DashboardReq) Reset() { *m = DashboardReq{} }
func (m *DashboardReq) String() string { return proto.CompactTextString(m) }
func (*DashboardReq) ProtoMessage() {}
func (*DashboardReq) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{13}
}
func (m *DashboardReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DashboardReq.Unmarshal(m, b)
}
func (m *DashboardReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DashboardReq.Marshal(b, m, deterministic)
}
func (dst *DashboardReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_DashboardReq.Merge(dst, src)
}
func (m *DashboardReq) XXX_Size() int {
return xxx_messageInfo_DashboardReq.Size(m)
}
func (m *DashboardReq) XXX_DiscardUnknown() {
xxx_messageInfo_DashboardReq.DiscardUnknown(m)
}
var xxx_messageInfo_DashboardReq proto.InternalMessageInfo
type DashboardStats struct {
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
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"`
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"`
Stats *StatSummary `protobuf:"bytes,6,opt,name=stats,proto3" json:"stats,omitempty"`
Connection bool `protobuf:"varint,7,opt,name=connection,proto3" json:"connection,omitempty"`
Uptime *duration.Duration `protobuf:"bytes,8,opt,name=uptime,proto3" json:"uptime,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DashboardStats) Reset() { *m = DashboardStats{} }
func (m *DashboardStats) String() string { return proto.CompactTextString(m) }
func (*DashboardStats) ProtoMessage() {}
func (*DashboardStats) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{14}
}
func (m *DashboardStats) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DashboardStats.Unmarshal(m, b)
}
func (m *DashboardStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DashboardStats.Marshal(b, m, deterministic)
}
func (dst *DashboardStats) XXX_Merge(src proto.Message) {
xxx_messageInfo_DashboardStats.Merge(dst, src)
}
func (m *DashboardStats) XXX_Size() int {
return xxx_messageInfo_DashboardStats.Size(m)
}
func (m *DashboardStats) XXX_DiscardUnknown() {
xxx_messageInfo_DashboardStats.DiscardUnknown(m)
}
var xxx_messageInfo_DashboardStats proto.InternalMessageInfo
func (m *DashboardStats) GetNodeId() string {
if m != nil {
return m.NodeId
}
return ""
}
func (m *DashboardStats) GetNodeConnections() int64 {
if m != nil {
return m.NodeConnections
}
return 0
}
func (m *DashboardStats) GetBootstrapAddress() string {
if m != nil {
return m.BootstrapAddress
}
return ""
}
func (m *DashboardStats) GetInternalAddress() string {
if m != nil {
return m.InternalAddress
}
return ""
}
func (m *DashboardStats) GetExternalAddress() string {
if m != nil {
return m.ExternalAddress
}
return ""
}
func (m *DashboardStats) GetStats() *StatSummary {
if m != nil {
return m.Stats
}
return nil
}
func (m *DashboardStats) GetConnection() bool {
if m != nil {
return m.Connection
}
return false
}
func (m *DashboardStats) GetUptime() *duration.Duration {
if m != nil {
return m.Uptime
}
return nil
}
type SignedHash struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Certs [][]byte `protobuf:"bytes,2,rep,name=certs,proto3" json:"certs,omitempty"`
@ -1009,7 +794,7 @@ func (m *SignedHash) Reset() { *m = SignedHash{} }
func (m *SignedHash) String() string { return proto.CompactTextString(m) }
func (*SignedHash) ProtoMessage() {}
func (*SignedHash) Descriptor() ([]byte, []int) {
return fileDescriptor_piecestore_d66b1513b309e82b, []int{15}
return fileDescriptor_569d535d76469daf, []int{11}
}
func (m *SignedHash) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignedHash.Unmarshal(m, b)
@ -1017,8 +802,8 @@ func (m *SignedHash) XXX_Unmarshal(b []byte) error {
func (m *SignedHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignedHash.Marshal(b, m, deterministic)
}
func (dst *SignedHash) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignedHash.Merge(dst, src)
func (m *SignedHash) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignedHash.Merge(m, src)
}
func (m *SignedHash) XXX_Size() int {
return xxx_messageInfo_SignedHash.Size(m)
@ -1051,6 +836,7 @@ func (m *SignedHash) GetSignature() []byte {
}
func init() {
proto.RegisterEnum("piecestoreroutes.BandwidthAction", BandwidthAction_name, BandwidthAction_value)
proto.RegisterType((*PayerBandwidthAllocation)(nil), "piecestoreroutes.PayerBandwidthAllocation")
proto.RegisterType((*RenterBandwidthAllocation)(nil), "piecestoreroutes.RenterBandwidthAllocation")
proto.RegisterType((*PieceStore)(nil), "piecestoreroutes.PieceStore")
@ -1063,13 +849,75 @@ func init() {
proto.RegisterType((*PieceDelete)(nil), "piecestoreroutes.PieceDelete")
proto.RegisterType((*PieceDeleteSummary)(nil), "piecestoreroutes.PieceDeleteSummary")
proto.RegisterType((*PieceStoreSummary)(nil), "piecestoreroutes.PieceStoreSummary")
proto.RegisterType((*StatsReq)(nil), "piecestoreroutes.StatsReq")
proto.RegisterType((*StatSummary)(nil), "piecestoreroutes.StatSummary")
proto.RegisterType((*SignedMessage)(nil), "piecestoreroutes.SignedMessage")
proto.RegisterType((*DashboardReq)(nil), "piecestoreroutes.DashboardReq")
proto.RegisterType((*DashboardStats)(nil), "piecestoreroutes.DashboardStats")
proto.RegisterType((*SignedHash)(nil), "piecestoreroutes.SignedHash")
proto.RegisterEnum("piecestoreroutes.BandwidthAction", BandwidthAction_name, BandwidthAction_value)
}
func init() { proto.RegisterFile("piecestore.proto", fileDescriptor_569d535d76469daf) }
var fileDescriptor_569d535d76469daf = []byte{
// 968 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0xc6,
0x13, 0x37, 0x49, 0x7d, 0x58, 0x23, 0x4b, 0x56, 0x36, 0xc6, 0x1f, 0xb4, 0xe0, 0xc4, 0xfa, 0x33,
0x6d, 0x20, 0x38, 0x80, 0xd3, 0xaa, 0x40, 0x81, 0x1e, 0x7a, 0xb0, 0x60, 0x23, 0x15, 0x8a, 0x3a,
0xc2, 0x4a, 0xbe, 0xa4, 0x40, 0xd9, 0x15, 0x39, 0x96, 0x16, 0xa1, 0x48, 0x81, 0x5c, 0xa6, 0xb2,
0xaf, 0x7d, 0x84, 0x1e, 0x7a, 0xe8, 0xb5, 0x0f, 0xd3, 0x17, 0xe8, 0x25, 0x87, 0x3c, 0x48, 0x4f,
0x05, 0x77, 0x29, 0xc9, 0xfa, 0xa0, 0x84, 0x16, 0xcd, 0x6d, 0x67, 0x76, 0x38, 0xfb, 0x9b, 0xf9,
0xcd, 0x07,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, 0x6f, 0x5f, 0xdc, 0x5c, 0x76, 0xfa, 0x35, 0x9d, 0x54, 0x01, 0x12, 0x91,
0x5e, 0x75, 0x2f, 0x3a, 0xb4, 0x66, 0x24, 0x72, 0xf7, 0x66, 0x2e, 0xe7, 0x5a, 0x7f, 0xea, 0x50,
0x5b, 0x30, 0x44, 0x65, 0xde, 0xc8, 0x25, 0xe4, 0xa5, 0x8e, 0x1c, 0x67, 0x34, 0x6d, 0xc7, 0xad,
0x3f, 0xcd, 0xda, 0x41, 0x8a, 0x64, 0x6b, 0x8f, 0xbc, 0x81, 0xfd, 0xb4, 0x2d, 0x90, 0x34, 0x76,
0x75, 0x7f, 0xfd, 0xf9, 0x2e, 0x0b, 0xd5, 0x59, 0xd6, 0x5e, 0x53, 0xfb, 0x4c, 0x23, 0xd7, 0x90,
0x57, 0xeb, 0xf7, 0x64, 0xdb, 0x2a, 0xac, 0x3f, 0xdb, 0x76, 0x3b, 0x47, 0xda, 0xd4, 0xc8, 0x6b,
0x28, 0xa4, 0x0d, 0xf7, 0x24, 0xe3, 0x13, 0x75, 0x5d, 0xff, 0x64, 0xeb, 0xf5, 0xdc, 0x65, 0x3b,
0xf7, 0x46, 0x9f, 0x0c, 0x06, 0x05, 0xf9, 0xd7, 0xfa, 0xc5, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff,
0xba, 0xef, 0xb1, 0x53, 0x07, 0x0b, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1088,8 +936,6 @@ type PieceStoreRoutesClient interface {
Retrieve(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_RetrieveClient, error)
Store(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_StoreClient, error)
Delete(ctx context.Context, in *PieceDelete, opts ...grpc.CallOption) (*PieceDeleteSummary, error)
Stats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatSummary, error)
Dashboard(ctx context.Context, in *DashboardReq, opts ...grpc.CallOption) (PieceStoreRoutes_DashboardClient, error)
}
type pieceStoreRoutesClient struct {
@ -1183,55 +1029,12 @@ func (c *pieceStoreRoutesClient) Delete(ctx context.Context, in *PieceDelete, op
return out, nil
}
func (c *pieceStoreRoutesClient) Stats(ctx context.Context, in *StatsReq, opts ...grpc.CallOption) (*StatSummary, error) {
out := new(StatSummary)
err := c.cc.Invoke(ctx, "/piecestoreroutes.PieceStoreRoutes/Stats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pieceStoreRoutesClient) Dashboard(ctx context.Context, in *DashboardReq, opts ...grpc.CallOption) (PieceStoreRoutes_DashboardClient, error) {
stream, err := c.cc.NewStream(ctx, &_PieceStoreRoutes_serviceDesc.Streams[2], "/piecestoreroutes.PieceStoreRoutes/Dashboard", opts...)
if err != nil {
return nil, err
}
x := &pieceStoreRoutesDashboardClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type PieceStoreRoutes_DashboardClient interface {
Recv() (*DashboardStats, error)
grpc.ClientStream
}
type pieceStoreRoutesDashboardClient struct {
grpc.ClientStream
}
func (x *pieceStoreRoutesDashboardClient) Recv() (*DashboardStats, error) {
m := new(DashboardStats)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// PieceStoreRoutesServer is the server API for PieceStoreRoutes service.
type PieceStoreRoutesServer interface {
Piece(context.Context, *PieceId) (*PieceSummary, error)
Retrieve(PieceStoreRoutes_RetrieveServer) error
Store(PieceStoreRoutes_StoreServer) error
Delete(context.Context, *PieceDelete) (*PieceDeleteSummary, error)
Stats(context.Context, *StatsReq) (*StatSummary, error)
Dashboard(*DashboardReq, PieceStoreRoutes_DashboardServer) error
}
func RegisterPieceStoreRoutesServer(s *grpc.Server, srv PieceStoreRoutesServer) {
@ -1326,45 +1129,6 @@ func _PieceStoreRoutes_Delete_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _PieceStoreRoutes_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PieceStoreRoutesServer).Stats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/piecestoreroutes.PieceStoreRoutes/Stats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PieceStoreRoutesServer).Stats(ctx, req.(*StatsReq))
}
return interceptor(ctx, in, info, handler)
}
func _PieceStoreRoutes_Dashboard_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DashboardReq)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(PieceStoreRoutesServer).Dashboard(m, &pieceStoreRoutesDashboardServer{stream})
}
type PieceStoreRoutes_DashboardServer interface {
Send(*DashboardStats) error
grpc.ServerStream
}
type pieceStoreRoutesDashboardServer struct {
grpc.ServerStream
}
func (x *pieceStoreRoutesDashboardServer) Send(m *DashboardStats) error {
return x.ServerStream.SendMsg(m)
}
var _PieceStoreRoutes_serviceDesc = grpc.ServiceDesc{
ServiceName: "piecestoreroutes.PieceStoreRoutes",
HandlerType: (*PieceStoreRoutesServer)(nil),
@ -1377,10 +1141,6 @@ var _PieceStoreRoutes_serviceDesc = grpc.ServiceDesc{
MethodName: "Delete",
Handler: _PieceStoreRoutes_Delete_Handler,
},
{
MethodName: "Stats",
Handler: _PieceStoreRoutes_Stats_Handler,
},
},
Streams: []grpc.StreamDesc{
{
@ -1394,95 +1154,6 @@ var _PieceStoreRoutes_serviceDesc = grpc.ServiceDesc{
Handler: _PieceStoreRoutes_Store_Handler,
ClientStreams: true,
},
{
StreamName: "Dashboard",
Handler: _PieceStoreRoutes_Dashboard_Handler,
ServerStreams: true,
},
},
Metadata: "piecestore.proto",
}
func init() { proto.RegisterFile("piecestore.proto", fileDescriptor_piecestore_d66b1513b309e82b) }
var fileDescriptor_piecestore_d66b1513b309e82b = []byte{
// 1239 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcb, 0x6e, 0xdb, 0x46,
0x17, 0x36, 0x49, 0x5d, 0x8f, 0xac, 0x4b, 0x26, 0xc6, 0xff, 0xcb, 0x42, 0x9c, 0xa8, 0x4c, 0x93,
0xaa, 0x09, 0xa0, 0x24, 0x0e, 0x50, 0xa0, 0x8b, 0x2e, 0xec, 0xca, 0x48, 0x85, 0xa2, 0x89, 0x3b,
0xb2, 0x37, 0x29, 0x50, 0x76, 0x44, 0x4e, 0x64, 0x22, 0x14, 0xa9, 0x72, 0x86, 0xa9, 0xec, 0x6d,
0x1f, 0xa1, 0x8b, 0x2e, 0xba, 0xed, 0xb6, 0xef, 0xd1, 0x67, 0xc8, 0x22, 0x7d, 0x83, 0x3e, 0x40,
0x57, 0xc5, 0xcc, 0xf0, 0x22, 0x4b, 0xa2, 0x84, 0x16, 0xcd, 0x8e, 0xe7, 0x9b, 0x8f, 0x87, 0xe7,
0xf2, 0xcd, 0xe1, 0x81, 0xd6, 0xcc, 0xa5, 0x36, 0x65, 0x3c, 0x08, 0x69, 0x7f, 0x16, 0x06, 0x3c,
0x40, 0x0b, 0x48, 0x18, 0x44, 0x9c, 0xb2, 0x0e, 0x4c, 0x82, 0x49, 0xa0, 0x4e, 0x3b, 0xb7, 0x27,
0x41, 0x30, 0xf1, 0xe8, 0x23, 0x69, 0x8d, 0xa3, 0x57, 0x8f, 0x9c, 0x28, 0x24, 0xdc, 0x0d, 0x7c,
0x75, 0x6e, 0xfe, 0x68, 0x40, 0xfb, 0x94, 0x5c, 0xd2, 0xf0, 0x98, 0xf8, 0xce, 0x0f, 0xae, 0xc3,
0x2f, 0x8e, 0x3c, 0x2f, 0xb0, 0x25, 0x05, 0x3d, 0x81, 0x5d, 0x46, 0x38, 0xf5, 0x3c, 0x97, 0x53,
0xcb, 0x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0xb2, 0xfb, 0x8c, 0x65, 0x91, 0xd0,
0x00, 0x8a, 0x12, 0x43, 0xfb, 0x39, 0x23, 0x7e, 0xe8, 0x74, 0x6e, 0xe7, 0x6d, 0x2c, 0xaa, 0xb8,
0xe6, 0x0e, 0x7a, 0x09, 0x95, 0x78, 0x88, 0x52, 0xd4, 0xdd, 0xf6, 0xaf, 0xe8, 0xdc, 0xdf, 0xc6,
0x50, 0x73, 0xd8, 0xdc, 0xe9, 0x69, 0x8f, 0x35, 0xf4, 0x1c, 0x8a, 0x6a, 0x59, 0xbb, 0xb5, 0x69,
0x71, 0xea, 0xdc, 0xdd, 0x74, 0x9a, 0x46, 0xda, 0xd3, 0xd0, 0x0b, 0x28, 0xc5, 0xe3, 0xf9, 0x20,
0xe7, 0x15, 0x75, 0xdc, 0xf9, 0x70, 0xe3, 0x71, 0x96, 0xfc, 0x40, 0x04, 0x28, 0xd4, 0xd5, 0x59,
0xaf, 0x41, 0x31, 0xaa, 0x3a, 0x9b, 0xf5, 0x69, 0xee, 0xa0, 0xaf, 0xa1, 0x9a, 0x5e, 0x54, 0xb4,
0xa6, 0xe2, 0x8b, 0xd7, 0xba, 0xd3, 0xdd, 0x70, 0x2e, 0x3f, 0x69, 0xee, 0x3c, 0xd6, 0x8e, 0x0b,
0x2f, 0xf5, 0xd9, 0x78, 0x5c, 0x92, 0xda, 0x7d, 0xfa, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81,
0x33, 0x07, 0x25, 0xce, 0x0d, 0x00, 0x00,
}

View File

@ -1,8 +1,5 @@
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
// Code generated by MockGen. DO NOT EDIT.
// Source: storj.io/storj/pkg/pb (interfaces: PieceStoreRoutesClient,PieceStoreRoutes_RetrieveClient)
// Source: piecestore.pb.go
// Package pb is a generated GoMock package.
package pb
@ -39,33 +36,11 @@ func (m *MockPieceStoreRoutesClient) EXPECT() *MockPieceStoreRoutesClientMockRec
return m.recorder
}
// Dashboard returns an object that mocks out the dashboard calls to pass tests
func (m *MockPieceStoreRoutesClient) Dashboard(ctx context.Context, req *DashboardReq, opts ...grpc.CallOption) (PieceStoreRoutes_DashboardClient, error) {
return nil, nil
}
// Delete mocks base method
func (m *MockPieceStoreRoutesClient) Delete(arg0 context.Context, arg1 *PieceDelete, arg2 ...grpc.CallOption) (*PieceDeleteSummary, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Delete", varargs...)
ret0, _ := ret[0].(*PieceDeleteSummary)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Delete indicates an expected call of Delete
func (mr *MockPieceStoreRoutesClientMockRecorder) Delete(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPieceStoreRoutesClient)(nil).Delete), varargs...)
}
// Piece mocks base method
func (m *MockPieceStoreRoutesClient) Piece(arg0 context.Context, arg1 *PieceId, arg2 ...grpc.CallOption) (*PieceSummary, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
func (m *MockPieceStoreRoutesClient) Piece(ctx context.Context, in *PieceId, opts ...grpc.CallOption) (*PieceSummary, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Piece", varargs...)
@ -75,15 +50,17 @@ func (m *MockPieceStoreRoutesClient) Piece(arg0 context.Context, arg1 *PieceId,
}
// Piece indicates an expected call of Piece
func (mr *MockPieceStoreRoutesClientMockRecorder) Piece(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
varargs := append([]interface{}{arg0, arg1}, arg2...)
func (mr *MockPieceStoreRoutesClientMockRecorder) Piece(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Piece", reflect.TypeOf((*MockPieceStoreRoutesClient)(nil).Piece), varargs...)
}
// Retrieve mocks base method
func (m *MockPieceStoreRoutesClient) Retrieve(arg0 context.Context, arg1 ...grpc.CallOption) (PieceStoreRoutes_RetrieveClient, error) {
varargs := []interface{}{arg0}
for _, a := range arg1 {
func (m *MockPieceStoreRoutesClient) Retrieve(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_RetrieveClient, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Retrieve", varargs...)
@ -93,33 +70,17 @@ func (m *MockPieceStoreRoutesClient) Retrieve(arg0 context.Context, arg1 ...grpc
}
// Retrieve indicates an expected call of Retrieve
func (mr *MockPieceStoreRoutesClientMockRecorder) Retrieve(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
varargs := append([]interface{}{arg0}, arg1...)
func (mr *MockPieceStoreRoutesClientMockRecorder) Retrieve(ctx interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Retrieve", reflect.TypeOf((*MockPieceStoreRoutesClient)(nil).Retrieve), varargs...)
}
// Stats mocks base method
func (m *MockPieceStoreRoutesClient) Stats(arg0 context.Context, arg1 *StatsReq, arg2 ...grpc.CallOption) (*StatSummary, error) {
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Stats", varargs...)
ret0, _ := ret[0].(*StatSummary)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Stats indicates an expected call of Stats
func (mr *MockPieceStoreRoutesClientMockRecorder) Stats(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stats", reflect.TypeOf((*MockPieceStoreRoutesClient)(nil).Stats), varargs...)
}
// Store mocks base method
func (m *MockPieceStoreRoutesClient) Store(arg0 context.Context, arg1 ...grpc.CallOption) (PieceStoreRoutes_StoreClient, error) {
varargs := []interface{}{arg0}
for _, a := range arg1 {
func (m *MockPieceStoreRoutesClient) Store(ctx context.Context, opts ...grpc.CallOption) (PieceStoreRoutes_StoreClient, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Store", varargs...)
@ -129,11 +90,32 @@ func (m *MockPieceStoreRoutesClient) Store(arg0 context.Context, arg1 ...grpc.Ca
}
// Store indicates an expected call of Store
func (mr *MockPieceStoreRoutesClientMockRecorder) Store(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
varargs := append([]interface{}{arg0}, arg1...)
func (mr *MockPieceStoreRoutesClientMockRecorder) Store(ctx interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockPieceStoreRoutesClient)(nil).Store), varargs...)
}
// Delete mocks base method
func (m *MockPieceStoreRoutesClient) Delete(ctx context.Context, in *PieceDelete, opts ...grpc.CallOption) (*PieceDeleteSummary, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Delete", varargs...)
ret0, _ := ret[0].(*PieceDeleteSummary)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Delete indicates an expected call of Delete
func (mr *MockPieceStoreRoutesClientMockRecorder) Delete(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPieceStoreRoutesClient)(nil).Delete), varargs...)
}
// MockPieceStoreRoutes_RetrieveClient is a mock of PieceStoreRoutes_RetrieveClient interface
type MockPieceStoreRoutes_RetrieveClient struct {
ctrl *gomock.Controller
@ -157,45 +139,23 @@ func (m *MockPieceStoreRoutes_RetrieveClient) EXPECT() *MockPieceStoreRoutes_Ret
return m.recorder
}
// CloseSend mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) CloseSend() error {
ret := m.ctrl.Call(m, "CloseSend")
// Send mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Send(arg0 *PieceRetrieval) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// CloseSend indicates an expected call of CloseSend
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) CloseSend() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).CloseSend))
}
// Context mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Context() context.Context {
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Context() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Context))
}
// Header mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Header() (metadata.MD, error) {
ret := m.ctrl.Call(m, "Header")
ret0, _ := ret[0].(metadata.MD)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Header indicates an expected call of Header
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Header() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Header))
// Send indicates an expected call of Send
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Send(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Send), arg0)
}
// Recv mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Recv() (*PieceRetrievalStream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*PieceRetrievalStream)
ret1, _ := ret[1].(error)
@ -204,47 +164,28 @@ func (m *MockPieceStoreRoutes_RetrieveClient) Recv() (*PieceRetrievalStream, err
// Recv indicates an expected call of Recv
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Recv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Recv))
}
// RecvMsg mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) RecvMsg(arg0 interface{}) error {
ret := m.ctrl.Call(m, "RecvMsg", arg0)
ret0, _ := ret[0].(error)
return ret0
// Header mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Header() (metadata.MD, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Header")
ret0, _ := ret[0].(metadata.MD)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RecvMsg indicates an expected call of RecvMsg
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).RecvMsg), arg0)
}
// Send mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Send(arg0 *PieceRetrieval) error {
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Send indicates an expected call of Send
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Send(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Send), arg0)
}
// SendMsg mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) SendMsg(arg0 interface{}) error {
ret := m.ctrl.Call(m, "SendMsg", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).SendMsg), arg0)
// Header indicates an expected call of Header
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Header() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Header))
}
// Trailer mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Trailer() metadata.MD {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Trailer")
ret0, _ := ret[0].(metadata.MD)
return ret0
@ -252,5 +193,548 @@ func (m *MockPieceStoreRoutes_RetrieveClient) Trailer() metadata.MD {
// Trailer indicates an expected call of Trailer
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Trailer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Trailer))
}
// CloseSend mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) CloseSend() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CloseSend")
ret0, _ := ret[0].(error)
return ret0
}
// CloseSend indicates an expected call of CloseSend
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) CloseSend() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).CloseSend))
}
// Context mocks base method
func (m *MockPieceStoreRoutes_RetrieveClient) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).Context))
}
// SendMsg mocks base method
func (m_2 *MockPieceStoreRoutes_RetrieveClient) SendMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) SendMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).SendMsg), m)
}
// RecvMsg mocks base method
func (m_2 *MockPieceStoreRoutes_RetrieveClient) RecvMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg
func (mr *MockPieceStoreRoutes_RetrieveClientMockRecorder) RecvMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveClient)(nil).RecvMsg), m)
}
// MockPieceStoreRoutes_StoreClient is a mock of PieceStoreRoutes_StoreClient interface
type MockPieceStoreRoutes_StoreClient struct {
ctrl *gomock.Controller
recorder *MockPieceStoreRoutes_StoreClientMockRecorder
}
// MockPieceStoreRoutes_StoreClientMockRecorder is the mock recorder for MockPieceStoreRoutes_StoreClient
type MockPieceStoreRoutes_StoreClientMockRecorder struct {
mock *MockPieceStoreRoutes_StoreClient
}
// NewMockPieceStoreRoutes_StoreClient creates a new mock instance
func NewMockPieceStoreRoutes_StoreClient(ctrl *gomock.Controller) *MockPieceStoreRoutes_StoreClient {
mock := &MockPieceStoreRoutes_StoreClient{ctrl: ctrl}
mock.recorder = &MockPieceStoreRoutes_StoreClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPieceStoreRoutes_StoreClient) EXPECT() *MockPieceStoreRoutes_StoreClientMockRecorder {
return m.recorder
}
// Send mocks base method
func (m *MockPieceStoreRoutes_StoreClient) Send(arg0 *PieceStore) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Send indicates an expected call of Send
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) Send(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).Send), arg0)
}
// CloseAndRecv mocks base method
func (m *MockPieceStoreRoutes_StoreClient) CloseAndRecv() (*PieceStoreSummary, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CloseAndRecv")
ret0, _ := ret[0].(*PieceStoreSummary)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CloseAndRecv indicates an expected call of CloseAndRecv
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) CloseAndRecv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseAndRecv", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).CloseAndRecv))
}
// Header mocks base method
func (m *MockPieceStoreRoutes_StoreClient) Header() (metadata.MD, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Header")
ret0, _ := ret[0].(metadata.MD)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Header indicates an expected call of Header
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) Header() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).Header))
}
// Trailer mocks base method
func (m *MockPieceStoreRoutes_StoreClient) Trailer() metadata.MD {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Trailer")
ret0, _ := ret[0].(metadata.MD)
return ret0
}
// Trailer indicates an expected call of Trailer
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) Trailer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).Trailer))
}
// CloseSend mocks base method
func (m *MockPieceStoreRoutes_StoreClient) CloseSend() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CloseSend")
ret0, _ := ret[0].(error)
return ret0
}
// CloseSend indicates an expected call of CloseSend
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) CloseSend() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).CloseSend))
}
// Context mocks base method
func (m *MockPieceStoreRoutes_StoreClient) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).Context))
}
// SendMsg mocks base method
func (m_2 *MockPieceStoreRoutes_StoreClient) SendMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) SendMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).SendMsg), m)
}
// RecvMsg mocks base method
func (m_2 *MockPieceStoreRoutes_StoreClient) RecvMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg
func (mr *MockPieceStoreRoutes_StoreClientMockRecorder) RecvMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockPieceStoreRoutes_StoreClient)(nil).RecvMsg), m)
}
// MockPieceStoreRoutesServer is a mock of PieceStoreRoutesServer interface
type MockPieceStoreRoutesServer struct {
ctrl *gomock.Controller
recorder *MockPieceStoreRoutesServerMockRecorder
}
// MockPieceStoreRoutesServerMockRecorder is the mock recorder for MockPieceStoreRoutesServer
type MockPieceStoreRoutesServerMockRecorder struct {
mock *MockPieceStoreRoutesServer
}
// NewMockPieceStoreRoutesServer creates a new mock instance
func NewMockPieceStoreRoutesServer(ctrl *gomock.Controller) *MockPieceStoreRoutesServer {
mock := &MockPieceStoreRoutesServer{ctrl: ctrl}
mock.recorder = &MockPieceStoreRoutesServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPieceStoreRoutesServer) EXPECT() *MockPieceStoreRoutesServerMockRecorder {
return m.recorder
}
// Piece mocks base method
func (m *MockPieceStoreRoutesServer) Piece(arg0 context.Context, arg1 *PieceId) (*PieceSummary, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Piece", arg0, arg1)
ret0, _ := ret[0].(*PieceSummary)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Piece indicates an expected call of Piece
func (mr *MockPieceStoreRoutesServerMockRecorder) Piece(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Piece", reflect.TypeOf((*MockPieceStoreRoutesServer)(nil).Piece), arg0, arg1)
}
// Retrieve mocks base method
func (m *MockPieceStoreRoutesServer) Retrieve(arg0 PieceStoreRoutes_RetrieveServer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Retrieve", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Retrieve indicates an expected call of Retrieve
func (mr *MockPieceStoreRoutesServerMockRecorder) Retrieve(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Retrieve", reflect.TypeOf((*MockPieceStoreRoutesServer)(nil).Retrieve), arg0)
}
// Store mocks base method
func (m *MockPieceStoreRoutesServer) Store(arg0 PieceStoreRoutes_StoreServer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store
func (mr *MockPieceStoreRoutesServerMockRecorder) Store(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockPieceStoreRoutesServer)(nil).Store), arg0)
}
// Delete mocks base method
func (m *MockPieceStoreRoutesServer) Delete(arg0 context.Context, arg1 *PieceDelete) (*PieceDeleteSummary, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1)
ret0, _ := ret[0].(*PieceDeleteSummary)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Delete indicates an expected call of Delete
func (mr *MockPieceStoreRoutesServerMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPieceStoreRoutesServer)(nil).Delete), arg0, arg1)
}
// MockPieceStoreRoutes_RetrieveServer is a mock of PieceStoreRoutes_RetrieveServer interface
type MockPieceStoreRoutes_RetrieveServer struct {
ctrl *gomock.Controller
recorder *MockPieceStoreRoutes_RetrieveServerMockRecorder
}
// MockPieceStoreRoutes_RetrieveServerMockRecorder is the mock recorder for MockPieceStoreRoutes_RetrieveServer
type MockPieceStoreRoutes_RetrieveServerMockRecorder struct {
mock *MockPieceStoreRoutes_RetrieveServer
}
// NewMockPieceStoreRoutes_RetrieveServer creates a new mock instance
func NewMockPieceStoreRoutes_RetrieveServer(ctrl *gomock.Controller) *MockPieceStoreRoutes_RetrieveServer {
mock := &MockPieceStoreRoutes_RetrieveServer{ctrl: ctrl}
mock.recorder = &MockPieceStoreRoutes_RetrieveServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPieceStoreRoutes_RetrieveServer) EXPECT() *MockPieceStoreRoutes_RetrieveServerMockRecorder {
return m.recorder
}
// Send mocks base method
func (m *MockPieceStoreRoutes_RetrieveServer) Send(arg0 *PieceRetrievalStream) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Send", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Send indicates an expected call of Send
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) Send(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).Send), arg0)
}
// Recv mocks base method
func (m *MockPieceStoreRoutes_RetrieveServer) Recv() (*PieceRetrieval, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*PieceRetrieval)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Recv indicates an expected call of Recv
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) Recv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).Recv))
}
// SetHeader mocks base method
func (m *MockPieceStoreRoutes_RetrieveServer) SetHeader(arg0 metadata.MD) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetHeader", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetHeader indicates an expected call of SetHeader
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).SetHeader), arg0)
}
// SendHeader mocks base method
func (m *MockPieceStoreRoutes_RetrieveServer) SendHeader(arg0 metadata.MD) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendHeader", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SendHeader indicates an expected call of SendHeader
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).SendHeader), arg0)
}
// SetTrailer mocks base method
func (m *MockPieceStoreRoutes_RetrieveServer) SetTrailer(arg0 metadata.MD) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetTrailer", arg0)
}
// SetTrailer indicates an expected call of SetTrailer
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).SetTrailer), arg0)
}
// Context mocks base method
func (m *MockPieceStoreRoutes_RetrieveServer) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).Context))
}
// SendMsg mocks base method
func (m_2 *MockPieceStoreRoutes_RetrieveServer) SendMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) SendMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).SendMsg), m)
}
// RecvMsg mocks base method
func (m_2 *MockPieceStoreRoutes_RetrieveServer) RecvMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg
func (mr *MockPieceStoreRoutes_RetrieveServerMockRecorder) RecvMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockPieceStoreRoutes_RetrieveServer)(nil).RecvMsg), m)
}
// MockPieceStoreRoutes_StoreServer is a mock of PieceStoreRoutes_StoreServer interface
type MockPieceStoreRoutes_StoreServer struct {
ctrl *gomock.Controller
recorder *MockPieceStoreRoutes_StoreServerMockRecorder
}
// MockPieceStoreRoutes_StoreServerMockRecorder is the mock recorder for MockPieceStoreRoutes_StoreServer
type MockPieceStoreRoutes_StoreServerMockRecorder struct {
mock *MockPieceStoreRoutes_StoreServer
}
// NewMockPieceStoreRoutes_StoreServer creates a new mock instance
func NewMockPieceStoreRoutes_StoreServer(ctrl *gomock.Controller) *MockPieceStoreRoutes_StoreServer {
mock := &MockPieceStoreRoutes_StoreServer{ctrl: ctrl}
mock.recorder = &MockPieceStoreRoutes_StoreServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPieceStoreRoutes_StoreServer) EXPECT() *MockPieceStoreRoutes_StoreServerMockRecorder {
return m.recorder
}
// SendAndClose mocks base method
func (m *MockPieceStoreRoutes_StoreServer) SendAndClose(arg0 *PieceStoreSummary) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendAndClose", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SendAndClose indicates an expected call of SendAndClose
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) SendAndClose(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendAndClose", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).SendAndClose), arg0)
}
// Recv mocks base method
func (m *MockPieceStoreRoutes_StoreServer) Recv() (*PieceStore, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*PieceStore)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Recv indicates an expected call of Recv
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) Recv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).Recv))
}
// SetHeader mocks base method
func (m *MockPieceStoreRoutes_StoreServer) SetHeader(arg0 metadata.MD) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetHeader", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetHeader indicates an expected call of SetHeader
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).SetHeader), arg0)
}
// SendHeader mocks base method
func (m *MockPieceStoreRoutes_StoreServer) SendHeader(arg0 metadata.MD) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendHeader", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SendHeader indicates an expected call of SendHeader
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).SendHeader), arg0)
}
// SetTrailer mocks base method
func (m *MockPieceStoreRoutes_StoreServer) SetTrailer(arg0 metadata.MD) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetTrailer", arg0)
}
// SetTrailer indicates an expected call of SetTrailer
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).SetTrailer), arg0)
}
// Context mocks base method
func (m *MockPieceStoreRoutes_StoreServer) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).Context))
}
// SendMsg mocks base method
func (m_2 *MockPieceStoreRoutes_StoreServer) SendMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) SendMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).SendMsg), m)
}
// RecvMsg mocks base method
func (m_2 *MockPieceStoreRoutes_StoreServer) RecvMsg(m interface{}) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg
func (mr *MockPieceStoreRoutes_StoreServerMockRecorder) RecvMsg(m interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockPieceStoreRoutes_StoreServer)(nil).RecvMsg), m)
}

View File

@ -14,8 +14,6 @@ service PieceStoreRoutes {
rpc Retrieve(stream PieceRetrieval) returns (stream PieceRetrievalStream) {}
rpc Store(stream PieceStore) returns (PieceStoreSummary) {}
rpc Delete(PieceDelete) returns (PieceDeleteSummary) {}
rpc Stats(StatsReq) returns (StatSummary) {}
rpc Dashboard(DashboardReq) returns (stream DashboardStats) {}
}
enum BandwidthAction {
@ -111,37 +109,15 @@ message PieceStoreSummary {
SignedHash signed_hash = 3;
}
message StatsReq {}
message StatSummary {
int64 used_space = 1;
int64 available_space = 2;
int64 used_bandwidth = 3;
int64 available_bandwidth = 4;
}
message SignedMessage {
bytes data = 1;
bytes signature = 2;
bytes public_key = 3;
}
message DashboardReq { }
message DashboardStats {
string node_id = 1;
int64 node_connections = 2;
string bootstrap_address = 3;
string internal_address = 4;
string external_address = 5;
StatSummary stats = 6;
bool connection = 7;
google.protobuf.Duration uptime = 8;
}
message SignedHash {
bytes hash = 1;
repeated bytes certs = 2;
bytes signature = 3;
}
}

View File

@ -1,44 +0,0 @@
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package psclient
import (
"context"
"storj.io/storj/pkg/pb"
"storj.io/storj/pkg/transport"
)
// LiteClient is the lightweight client for getting stats
type LiteClient interface {
Stats(ctx context.Context) (*pb.StatSummary, error)
Dashboard(ctx context.Context) (pb.PieceStoreRoutes_DashboardClient, error)
}
// PieceStoreLite is the struct that holds the client
type PieceStoreLite struct {
client pb.PieceStoreRoutesClient
}
// Dashboard returns a simple terminal dashboard displaying info
func (psl *PieceStoreLite) Dashboard(ctx context.Context) (pb.PieceStoreRoutes_DashboardClient, error) {
return psl.client.Dashboard(ctx, &pb.DashboardReq{})
}
// Stats will retrieve stats about a piece storage node
func (psl *PieceStoreLite) Stats(ctx context.Context) (*pb.StatSummary, error) {
return psl.client.Stats(ctx, &pb.StatsReq{})
}
// NewLiteClient returns a new LiteClient
func NewLiteClient(ctx context.Context, tc transport.Client, n *pb.Node) (LiteClient, error) {
conn, err := tc.DialNode(ctx, n)
if err != nil {
return nil, err
}
return &PieceStoreLite{
client: pb.NewPieceStoreRoutesClient(conn),
}, nil
}

View File

@ -21,19 +21,21 @@ var (
// Monitor contains the information needed to run the bucket refresher service
type Monitor struct { // TODO: rename to something clearer
log *zap.Logger
ticker *time.Ticker
rt *kademlia.RoutingTable
server *Server
log *zap.Logger
ticker *time.Ticker
rt *kademlia.RoutingTable
server *Server
inspector *Inspector
}
// NewMonitor creates a disk monitor
func NewMonitor(log *zap.Logger, interval time.Duration, rt *kademlia.RoutingTable, server *Server) *Monitor {
return &Monitor{
log: log,
ticker: time.NewTicker(interval),
rt: rt,
server: server,
log: log,
ticker: time.NewTicker(interval),
rt: rt,
server: server,
inspector: NewInspector(server),
}
}
@ -55,7 +57,7 @@ func (service *Monitor) Run(ctx context.Context) error {
// process will attempt to update the kademlia bucket with the latest information about the storage node
func (service *Monitor) process(ctx context.Context) error {
stats, err := service.server.Stats(ctx, nil)
stats, err := service.inspector.Stats(ctx, nil)
if err != nil {
return Error.Wrap(err)
}

View File

@ -0,0 +1,101 @@
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package psserver
import (
"context"
"strings"
"time"
"github.com/golang/protobuf/ptypes"
"storj.io/storj/pkg/pb"
"storj.io/storj/pkg/storj"
)
// Inspector is a gRPC service for inspecting psserver internals
type Inspector struct {
ps *Server
}
// NewInspector creates an Inspector
func NewInspector(psserver *Server) *Inspector {
return &Inspector{
ps: psserver,
}
}
func (s *Inspector) retrieveStats() (*pb.StatSummaryResponse, error) {
totalUsed, err := s.ps.DB.SumTTLSizes()
if err != nil {
return nil, err
}
totalUsedBandwidth, err := s.ps.DB.GetTotalBandwidthBetween(getBeginningOfMonth(), time.Now())
if err != nil {
return nil, err
}
return &pb.StatSummaryResponse{
UsedSpace: totalUsed,
AvailableSpace: (s.ps.totalAllocated - totalUsed),
UsedBandwidth: totalUsedBandwidth,
AvailableBandwidth: (s.ps.totalBwAllocated - totalUsedBandwidth),
}, nil
}
// Stats returns current statistics about the server.
func (s *Inspector) Stats(ctx context.Context, in *pb.StatsRequest) (*pb.StatSummaryResponse, error) {
s.ps.log.Debug("Getting Stats...")
statsSummary, err := s.retrieveStats()
if err != nil {
return nil, err
}
s.ps.log.Info("Successfully retrieved Stats...")
return statsSummary, nil
}
func (s *Inspector) getDashboardData(ctx context.Context) (*pb.DashboardResponse, error) {
statsSummary, err := s.retrieveStats()
if err != nil {
return &pb.DashboardResponse{}, ServerError.Wrap(err)
}
nodes, err := s.ps.kad.FindNear(ctx, storj.NodeID{}, 10000000)
if err != nil {
return &pb.DashboardResponse{}, ServerError.Wrap(err)
}
bootstrapNodes := s.ps.kad.GetBootstrapNodes()
bsNodes := make([]string, len(bootstrapNodes))
for i, node := range bootstrapNodes {
bsNodes[i] = node.Address.Address
}
return &pb.DashboardResponse{
NodeId: s.ps.kad.Local().Id.String(),
NodeConnections: int64(len(nodes)),
BootstrapAddress: strings.Join(bsNodes[:], ", "),
InternalAddress: "",
ExternalAddress: s.ps.kad.Local().Address.Address,
Connection: true,
Uptime: ptypes.DurationProto(time.Since(s.ps.startTime)),
Stats: statsSummary,
}, nil
}
// Dashboard returns dashboard data.
func (s *Inspector) Dashboard(ctx context.Context, in *pb.DashboardRequest) (*pb.DashboardResponse, error) {
data, err := s.getDashboardData(ctx)
if err != nil {
s.ps.log.Warn("unable to create dashboard data proto")
return nil, err
}
return data, nil
}

View File

@ -16,7 +16,6 @@ import (
"strings"
"time"
"github.com/golang/protobuf/ptypes"
"github.com/mr-tron/base58/base58"
"github.com/zeebo/errs"
"go.uber.org/zap"
@ -199,62 +198,6 @@ func (s *Server) Piece(ctx context.Context, in *pb.PieceId) (*pb.PieceSummary, e
return &pb.PieceSummary{Id: in.GetId(), PieceSize: size, ExpirationUnixSec: ttl}, nil
}
// Stats returns current statistics about the server.
func (s *Server) Stats(ctx context.Context, in *pb.StatsReq) (*pb.StatSummary, error) {
s.log.Debug("Getting Stats...")
statsSummary, err := s.retrieveStats()
if err != nil {
return nil, err
}
s.log.Info("Successfully retrieved Stats...")
return statsSummary, nil
}
func (s *Server) retrieveStats() (*pb.StatSummary, error) {
totalUsed, err := s.DB.SumTTLSizes()
if err != nil {
return nil, err
}
totalUsedBandwidth, err := s.DB.GetTotalBandwidthBetween(getBeginningOfMonth(), time.Now())
if err != nil {
return nil, err
}
return &pb.StatSummary{UsedSpace: totalUsed, AvailableSpace: (s.totalAllocated - totalUsed), UsedBandwidth: totalUsedBandwidth, AvailableBandwidth: (s.totalBwAllocated - totalUsedBandwidth)}, nil
}
// Dashboard is a stream that sends data every `interval` seconds to the listener.
func (s *Server) Dashboard(in *pb.DashboardReq, stream pb.PieceStoreRoutes_DashboardServer) (err error) {
ctx := stream.Context()
ticker := time.NewTicker(3 * time.Second)
for {
select {
case <-ctx.Done():
if ctx.Err() == context.Canceled {
return nil
}
return ctx.Err()
case <-ticker.C:
data, err := s.getDashboardData(ctx)
if err != nil {
s.log.Warn("unable to create dashboard data proto")
continue
}
if err := stream.Send(data); err != nil {
s.log.Error("error sending dashboard stream", zap.Error(err))
return err
}
}
}
}
// Delete deletes data based on the specified ID.
func (s *Server) Delete(ctx context.Context, in *pb.PieceDelete) (*pb.PieceDeleteSummary, error) {
s.log.Debug("Deleting", zap.String("Piece ID", fmt.Sprint(in.GetId())))
@ -363,34 +306,3 @@ func getNamespacedPieceID(pieceID, namespace []byte) (string, error) {
h := mac.Sum(nil)
return base58.Encode(h), nil
}
func (s *Server) getDashboardData(ctx context.Context) (*pb.DashboardStats, error) {
statsSummary, err := s.retrieveStats()
if err != nil {
return &pb.DashboardStats{}, ServerError.Wrap(err)
}
nodes, err := s.kad.FindNear(ctx, storj.NodeID{}, 10000000)
if err != nil {
return &pb.DashboardStats{}, ServerError.Wrap(err)
}
bootstrapNodes := s.kad.GetBootstrapNodes()
bsNodes := make([]string, len(bootstrapNodes))
for i, node := range bootstrapNodes {
bsNodes[i] = node.Address.Address
}
return &pb.DashboardStats{
NodeId: s.kad.Local().Id.String(),
NodeConnections: int64(len(nodes)),
BootstrapAddress: strings.Join(bsNodes[:], ", "),
InternalAddress: "",
ExternalAddress: s.kad.Local().Address.Address,
Connection: true,
Uptime: ptypes.DurationProto(time.Since(s.startTime)),
Stats: statsSummary,
}, nil
}

View File

@ -817,6 +817,51 @@
}
]
},
{
"name": "NodeInfoRequest",
"fields": [
{
"id": 1,
"name": "id",
"type": "bytes",
"options": [
{
"name": "(gogoproto.customtype)",
"value": "NodeID"
},
{
"name": "(gogoproto.nullable)",
"value": "false"
}
]
},
{
"id": 2,
"name": "address",
"type": "node.NodeAddress"
}
]
},
{
"name": "NodeInfoResponse",
"fields": [
{
"id": 1,
"name": "type",
"type": "node.NodeType"
},
{
"id": 2,
"name": "operator",
"type": "node.NodeOperator"
},
{
"id": 3,
"name": "capacity",
"type": "node.NodeCapacity"
}
]
},
{
"name": "FindNearRequest",
"fields": [
@ -867,6 +912,96 @@
"is_repeated": true
}
]
},
{
"name": "DumpNodesRequest"
},
{
"name": "DumpNodesResponse",
"fields": [
{
"id": 1,
"name": "nodes",
"type": "node.Node",
"is_repeated": true
}
]
},
{
"name": "StatsRequest"
},
{
"name": "StatSummaryResponse",
"fields": [
{
"id": 1,
"name": "used_space",
"type": "int64"
},
{
"id": 2,
"name": "available_space",
"type": "int64"
},
{
"id": 3,
"name": "used_bandwidth",
"type": "int64"
},
{
"id": 4,
"name": "available_bandwidth",
"type": "int64"
}
]
},
{
"name": "DashboardRequest"
},
{
"name": "DashboardResponse",
"fields": [
{
"id": 1,
"name": "node_id",
"type": "string"
},
{
"id": 2,
"name": "node_connections",
"type": "int64"
},
{
"id": 3,
"name": "bootstrap_address",
"type": "string"
},
{
"id": 4,
"name": "internal_address",
"type": "string"
},
{
"id": 5,
"name": "external_address",
"type": "string"
},
{
"id": 6,
"name": "stats",
"type": "StatSummaryResponse"
},
{
"id": 7,
"name": "connection",
"type": "bool"
},
{
"id": 8,
"name": "uptime",
"type": "google.protobuf.Duration"
}
]
}
],
"services": [
@ -888,10 +1023,20 @@
"in_type": "LookupNodeRequest",
"out_type": "LookupNodeResponse"
},
{
"name": "NodeInfo",
"in_type": "NodeInfoRequest",
"out_type": "NodeInfoResponse"
},
{
"name": "FindNear",
"in_type": "FindNearRequest",
"out_type": "FindNearResponse"
},
{
"name": "DumpNodes",
"in_type": "DumpNodesRequest",
"out_type": "DumpNodesResponse"
}
]
},
@ -902,6 +1047,11 @@
"name": "CountNodes",
"in_type": "CountNodesRequest",
"out_type": "CountNodesResponse"
},
{
"name": "DumpNodes",
"in_type": "DumpNodesRequest",
"out_type": "DumpNodesResponse"
}
]
},
@ -919,6 +1069,21 @@
"out_type": "CreateStatsResponse"
}
]
},
{
"name": "PieceStoreInspector",
"rpcs": [
{
"name": "Stats",
"in_type": "StatsRequest",
"out_type": "StatSummaryResponse"
},
{
"name": "Dashboard",
"in_type": "DashboardRequest",
"out_type": "DashboardResponse"
}
]
}
],
"imports": [
@ -927,6 +1092,9 @@
},
{
"path": "node.proto"
},
{
"path": "google/protobuf/duration.proto"
}
],
"package": {
@ -1002,21 +1170,6 @@
}
],
"messages": [
{
"name": "NodeRestrictions",
"fields": [
{
"id": 1,
"name": "free_bandwidth",
"type": "int64"
},
{
"id": 2,
"name": "free_disk",
"type": "int64"
}
]
},
{
"name": "Node",
"fields": [
@ -1163,6 +1316,36 @@
}
]
},
{
"name": "NodeOperator",
"fields": [
{
"id": 1,
"name": "email",
"type": "string"
},
{
"id": 2,
"name": "wallet",
"type": "string"
}
]
},
{
"name": "NodeCapacity",
"fields": [
{
"id": 1,
"name": "free_bandwidth",
"type": "int64"
},
{
"id": 2,
"name": "free_disk",
"type": "int64"
}
]
},
{
"name": "NodeMetadata",
"fields": [
@ -1177,6 +1360,21 @@
"type": "string"
}
]
},
{
"name": "NodeRestrictions",
"fields": [
{
"id": 1,
"name": "free_bandwidth",
"type": "int64"
},
{
"id": 2,
"name": "free_disk",
"type": "int64"
}
]
}
],
"imports": [
@ -1423,6 +1621,29 @@
{
"name": "PingResponse"
},
{
"name": "InfoRequest"
},
{
"name": "InfoResponse",
"fields": [
{
"id": 2,
"name": "type",
"type": "node.NodeType"
},
{
"id": 3,
"name": "operator",
"type": "node.NodeOperator"
},
{
"id": 4,
"name": "capacity",
"type": "node.NodeCapacity"
}
]
},
{
"name": "Restriction",
"fields": [
@ -1477,6 +1698,11 @@
"name": "Ping",
"in_type": "PingRequest",
"out_type": "PingResponse"
},
{
"name": "RequestInfo",
"in_type": "InfoRequest",
"out_type": "InfoResponse"
}
]
}
@ -1661,7 +1887,18 @@
{
"id": 3,
"name": "authorization",
"type": "SignedMessage"
"type": "SignedMessage",
"options": [
{
"name": "deprecated",
"value": "true"
}
]
},
{
"id": 4,
"name": "signed_hash",
"type": "SignedHash"
}
],
"messages": [
@ -1698,7 +1935,28 @@
{
"id": 2,
"name": "authorization",
"type": "SignedMessage"
"type": "SignedMessage",
"options": [
{
"name": "deprecated",
"value": "true"
}
]
},
{
"id": 3,
"name": "satellite_id",
"type": "bytes",
"options": [
{
"name": "(gogoproto.customtype)",
"value": "NodeID"
},
{
"name": "(gogoproto.nullable)",
"value": "false"
}
]
}
]
},
@ -1738,7 +1996,13 @@
{
"id": 3,
"name": "authorization",
"type": "SignedMessage"
"type": "SignedMessage",
"options": [
{
"name": "deprecated",
"value": "true"
}
]
}
],
"messages": [
@ -1790,7 +2054,28 @@
{
"id": 3,
"name": "authorization",
"type": "SignedMessage"
"type": "SignedMessage",
"options": [
{
"name": "deprecated",
"value": "true"
}
]
},
{
"id": 4,
"name": "satellite_id",
"type": "bytes",
"options": [
{
"name": "(gogoproto.customtype)",
"value": "NodeID"
},
{
"name": "(gogoproto.nullable)",
"value": "false"
}
]
}
]
},
@ -1816,34 +2101,11 @@
"id": 2,
"name": "total_received",
"type": "int64"
}
]
},
{
"name": "StatsReq"
},
{
"name": "StatSummary",
"fields": [
{
"id": 1,
"name": "used_space",
"type": "int64"
},
{
"id": 2,
"name": "available_space",
"type": "int64"
},
{
"id": 3,
"name": "used_bandwidth",
"type": "int64"
},
{
"id": 4,
"name": "available_bandwidth",
"type": "int64"
"name": "signed_hash",
"type": "SignedHash"
}
]
},
@ -1868,50 +2130,23 @@
]
},
{
"name": "DashboardReq"
},
{
"name": "DashboardStats",
"name": "SignedHash",
"fields": [
{
"id": 1,
"name": "node_id",
"type": "string"
"name": "hash",
"type": "bytes"
},
{
"id": 2,
"name": "node_connections",
"type": "int64"
"name": "certs",
"type": "bytes",
"is_repeated": true
},
{
"id": 3,
"name": "bootstrap_address",
"type": "string"
},
{
"id": 4,
"name": "internal_address",
"type": "string"
},
{
"id": 5,
"name": "external_address",
"type": "string"
},
{
"id": 6,
"name": "stats",
"type": "StatSummary"
},
{
"id": 7,
"name": "connection",
"type": "bool"
},
{
"id": 8,
"name": "uptime",
"type": "google.protobuf.Duration"
"name": "signature",
"type": "bytes"
}
]
}
@ -1942,17 +2177,6 @@
"name": "Delete",
"in_type": "PieceDelete",
"out_type": "PieceDeleteSummary"
},
{
"name": "Stats",
"in_type": "StatsReq",
"out_type": "StatSummary"
},
{
"name": "Dashboard",
"in_type": "DashboardReq",
"out_type": "DashboardStats",
"out_streamed": true
}
]
}
@ -2053,6 +2277,11 @@
"value": "false"
}
]
},
{
"id": 3,
"name": "hash",
"type": "piecestoreroutes.SignedHash"
}
]
},

View File

@ -74,14 +74,17 @@ func main() {
sort.Slice(pkgs, func(i, k int) bool { return pkgs[i].ID < pkgs[k].ID })
correct := true
incorrectPkgs := []string{}
for _, pkg := range pkgs {
if !correctPackage(pkg) {
incorrectPkgs = append(incorrectPkgs, pkg.String())
correct = false
}
}
if !correct {
fmt.Fprintln(os.Stderr, "imports not in the correct order")
fmt.Fprintln(os.Stderr, "Error: imports are not in the correct order for package/s: ", incorrectPkgs)
fmt.Fprintln(os.Stderr, "Correct order should be: std packages -> external packages -> storj.io packages.")
os.Exit(1)
}
}

View File

@ -80,6 +80,7 @@ type Peer struct {
Endpoint *psserver.Server // TODO: separate into endpoint and service
Monitor *psserver.Monitor
Collector *psserver.Collector
Inspector *psserver.Inspector
}
Agreements struct {
@ -170,6 +171,9 @@ func New(log *zap.Logger, full *identity.FullIdentity, db DB, config Config) (*P
}
pb.RegisterPieceStoreRoutesServer(peer.Public.Server.GRPC(), peer.Storage.Endpoint)
peer.Storage.Inspector = psserver.NewInspector(peer.Storage.Endpoint)
pb.RegisterPieceStoreInspectorServer(peer.Public.Server.GRPC(), peer.Storage.Inspector)
// TODO: organize better
peer.Storage.Monitor = psserver.NewMonitor(peer.Log.Named("piecestore:monitor"), config.KBucketRefreshInterval, peer.Kademlia.RoutingTable, peer.Storage.Endpoint)
peer.Storage.Collector = psserver.NewCollector(peer.Log.Named("piecestore:collector"), peer.DB.PSDB(), peer.DB.Storage(), config.CollectorInterval)