Endpoint for local node info (#1355)

Adds a new `Info` method to the Kademlia endpoint that returns the following local node info:
* ID
* Type
* Metadata (email and wallet)
* Restrictions (free storage and bandwidth)

The new endpoint is exposed as `inspector kad node-info` command too.
This commit is contained in:
Kaloyan Raev 2019-02-25 20:41:51 +02:00 committed by Michal Niewrzal
parent 81408a3c9e
commit 1ec17653d4
13 changed files with 773 additions and 242 deletions

View File

@ -75,6 +75,12 @@ var (
Args: cobra.MinimumNArgs(1),
RunE: LookupNode,
}
nodeInfoCmd = &cobra.Command{
Use: "node-info <node_id>",
Short: "get node info directly from node",
Args: cobra.MinimumNArgs(1),
RunE: NodeInfo,
}
dumpNodesCmd = &cobra.Command{
Use: "dump-nodes",
Short: "dump all nodes in the routing table",
@ -184,6 +190,34 @@ func LookupNode(cmd *cobra.Command, args []string) (err error) {
return nil
}
// NodeInfo get node info directly from the node with provided Node ID
func NodeInfo(cmd *cobra.Command, args []string) (err error) {
i, err := NewInspector(*Addr, *IdentityPath)
if err != nil {
return ErrInspectorDial.Wrap(err)
}
// first lookup the node to get its address
n, err := i.kadclient.LookupNode(context.Background(), &pb.LookupNodeRequest{
Id: args[0],
})
if err != nil {
return ErrRequest.Wrap(err)
}
// now ask the node directly for its node info
info, err := i.kadclient.NodeInfo(context.Background(), &pb.NodeInfoRequest{
Address: n.GetNode().GetAddress(),
})
if err != nil {
return ErrRequest.Wrap(err)
}
fmt.Println(prettyPrint(info))
return nil
}
// DumpNodes outputs a json list of every node in every bucket in the satellite
func DumpNodes(cmd *cobra.Command, args []string) (err error) {
i, err := NewInspector(*Addr, *IdentityPath)
@ -414,6 +448,7 @@ func init() {
kadCmd.AddCommand(countNodeCmd)
kadCmd.AddCommand(pingNodeCmd)
kadCmd.AddCommand(lookupNodeCmd)
kadCmd.AddCommand(nodeInfoCmd)
kadCmd.AddCommand(dumpNodesCmd)
statsCmd.AddCommand(getStatsCmd)

View File

@ -109,6 +109,31 @@ func (dialer *Dialer) FetchPeerIdentity(ctx context.Context, target pb.Node) (pI
return identity.PeerIdentityFromPeer(p)
}
// FetchInfo connects to a node address and returns its node info.
func (dialer *Dialer) FetchInfo(ctx context.Context, address *pb.NodeAddress) (*identity.PeerIdentity, *pb.InfoResponse, error) {
if !dialer.limit.Lock() {
return nil, nil, context.Canceled
}
defer dialer.limit.Unlock()
conn, err := dialer.dialAddress(ctx, address)
if err != nil {
return nil, nil, err
}
p := &peer.Peer{}
pCall := grpc.Peer(p)
resp, err := conn.client.RequestInfo(ctx, &pb.InfoRequest{}, pCall)
if err != nil {
return nil, nil, errs.Combine(err, conn.disconnect())
}
id, err := identity.PeerIdentityFromPeer(p)
return id, resp, errs.Combine(err, conn.disconnect())
}
// dial dials the specified node.
func (dialer *Dialer) dial(ctx context.Context, target pb.Node) (*Conn, error) {
grpcconn, err := dialer.transport.DialNode(ctx, &target)
@ -118,6 +143,15 @@ func (dialer *Dialer) dial(ctx context.Context, target pb.Node) (*Conn, error) {
}, err
}
// dialAddress dials the specified address.
func (dialer *Dialer) dialAddress(ctx context.Context, address *pb.NodeAddress) (*Conn, error) {
grpcconn, err := dialer.transport.DialAddress(ctx, address.GetAddress())
return &Conn{
conn: grpcconn,
client: pb.NewNodesClient(grpcconn),
}, err
}
// disconnect disconnects this connection.
func (conn *Conn) disconnect() error {
return conn.conn.Close()

View File

@ -76,3 +76,20 @@ func (endpoint *Endpoint) Ping(ctx context.Context, req *pb.PingRequest) (*pb.Pi
//TODO
return &pb.PingResponse{}, nil
}
// RequestInfo returns the node info
func (endpoint *Endpoint) RequestInfo(ctx context.Context, req *pb.InfoRequest) (*pb.InfoResponse, error) {
self := endpoint.service.Local()
return &pb.InfoResponse{
Type: self.GetType(),
Operator: &pb.NodeOperator{
Email: self.GetMetadata().GetEmail(),
Wallet: self.GetMetadata().GetWallet(),
},
Capacity: &pb.NodeCapacity{
FreeBandwidth: self.GetRestrictions().GetFreeBandwidth(),
FreeDisk: self.GetRestrictions().GetFreeDisk(),
},
}, nil
}

View File

@ -104,3 +104,18 @@ func (srv *Inspector) LookupNode(ctx context.Context, req *pb.LookupNodeRequest)
Node: &node,
}, nil
}
// NodeInfo sends a PING RPC to a node and returns its local info.
func (srv *Inspector) NodeInfo(ctx context.Context, req *pb.NodeInfoRequest) (*pb.NodeInfoResponse, error) {
id, info, err := srv.dht.FetchInfo(ctx, req.Address)
if err != nil {
return &pb.NodeInfoResponse{}, err
}
return &pb.NodeInfoResponse{
Id: id.ID,
Type: info.GetType(),
Operator: info.GetOperator(),
Capacity: info.GetCapacity(),
}, nil
}

View File

@ -186,6 +186,20 @@ func (k *Kademlia) Ping(ctx context.Context, node pb.Node) (pb.Node, error) {
return node, nil
}
// FetchInfo connects to a node address and returns the node info
func (k *Kademlia) FetchInfo(ctx context.Context, address *pb.NodeAddress) (*identity.PeerIdentity, *pb.InfoResponse, error) {
if !k.lookups.Start() {
return nil, nil, context.Canceled
}
defer k.lookups.Done()
id, info, err := k.dialer.FetchInfo(ctx, address)
if err != nil {
return nil, nil, NodeErr.Wrap(err)
}
return id, info, nil
}
// FindNode looks up the provided NodeID first in the local Node, and if it is not found
// begins searching the network for the NodeID. Returns and error if node was not found
func (k *Kademlia) FindNode(ctx context.Context, ID storj.NodeID) (pb.Node, error) {

View File

@ -24,3 +24,19 @@ func TestFetchPeerIdentity(t *testing.T) {
require.True(t, sat.Identity.CA.Equal(peerID.CA))
})
}
func TestRequestInfo(t *testing.T) {
testplanet.Run(t, testplanet.Config{
SatelliteCount: 1, StorageNodeCount: 1, UplinkCount: 0,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
node := planet.StorageNodes[0]
id, info, err := planet.Satellites[0].Kademlia.Service.FetchInfo(ctx, node.Local().Address)
require.NoError(t, err)
require.Equal(t, node.ID(), id.ID)
require.Equal(t, node.Local().Type, info.GetType())
require.Equal(t, node.Local().Metadata.GetEmail(), info.GetOperator().GetEmail())
require.Equal(t, node.Local().Metadata.GetWallet(), info.GetOperator().GetWallet())
require.Equal(t, node.Local().Restrictions.GetFreeDisk(), info.GetCapacity().GetFreeDisk())
require.Equal(t, node.Local().Restrictions.GetFreeBandwidth(), info.GetCapacity().GetFreeBandwidth())
})
}

View File

@ -492,6 +492,7 @@ func TestRandomIds(t *testing.T) {
type mockNodesServer struct {
queryCalled int32
pingCalled int32
infoCalled int32
returnValue []*pb.Node
}
@ -505,6 +506,11 @@ func (mn *mockNodesServer) Ping(ctx context.Context, req *pb.PingRequest) (*pb.P
return &pb.PingResponse{}, nil
}
func (mn *mockNodesServer) RequestInfo(ctx context.Context, req *pb.InfoRequest) (*pb.InfoResponse, error) {
atomic.AddInt32(&mn.infoCalled, 1)
return &pb.InfoResponse{}, nil
}
// newKademlia returns a newly configured Kademlia instance
func newKademlia(log *zap.Logger, nodeType pb.NodeType, bootstrapNodes []pb.Node, address string, metadata *pb.NodeMetadata, identity *identity.FullIdentity, path string, alpha int) (*Kademlia, error) {
self := pb.Node{

View File

@ -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_3c76240ddc9521cd, []int{0}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{0}
}
func (m *GetStatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetStatsRequest.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{1}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{1}
}
func (m *GetStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetStatsResponse.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{2}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{2}
}
func (m *CreateStatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateStatsRequest.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{3}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{3}
}
func (m *CreateStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateStatsResponse.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{4}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{4}
}
func (m *CountNodesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CountNodesResponse.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{5}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{5}
}
func (m *CountNodesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CountNodesRequest.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{6}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{6}
}
func (m *GetBucketsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketsRequest.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{7}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{7}
}
func (m *GetBucketsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketsResponse.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{8}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{8}
}
func (m *GetBucketRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketRequest.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{9}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{9}
}
func (m *GetBucketResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBucketResponse.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{10}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{10}
}
func (m *Bucket) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Bucket.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{11}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{11}
}
func (m *BucketList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BucketList.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{12}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{12}
}
func (m *PingNodeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PingNodeRequest.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{13}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{13}
}
func (m *PingNodeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PingNodeResponse.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{14}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{14}
}
func (m *LookupNodeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupNodeRequest.Unmarshal(m, b)
@ -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_3c76240ddc9521cd, []int{15}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{15}
}
func (m *LookupNodeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupNodeResponse.Unmarshal(m, b)
@ -668,6 +668,99 @@ func (m *LookupNodeResponse) GetMeta() *NodeMetadata {
return nil
}
type NodeInfoRequest struct {
Address *NodeAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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_0f6ce43677df14a8, []int{16}
}
func (m *NodeInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeInfoRequest.Unmarshal(m, b)
}
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_Size() int {
return xxx_messageInfo_NodeInfoRequest.Size(m)
}
func (m *NodeInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_NodeInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_NodeInfoRequest proto.InternalMessageInfo
func (m *NodeInfoRequest) GetAddress() *NodeAddress {
if m != nil {
return m.Address
}
return nil
}
type NodeInfoResponse struct {
Id NodeID `protobuf:"bytes,1,opt,name=id,proto3,customtype=NodeID" json:"id"`
Type NodeType `protobuf:"varint,2,opt,name=type,proto3,enum=node.NodeType" json:"type,omitempty"`
Operator *NodeOperator `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
Capacity *NodeCapacity `protobuf:"bytes,4,opt,name=capacity,proto3" json:"capacity,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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_0f6ce43677df14a8, []int{17}
}
func (m *NodeInfoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeInfoResponse.Unmarshal(m, b)
}
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_Size() int {
return xxx_messageInfo_NodeInfoResponse.Size(m)
}
func (m *NodeInfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_NodeInfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_NodeInfoResponse proto.InternalMessageInfo
func (m *NodeInfoResponse) GetType() NodeType {
if m != nil {
return m.Type
}
return NodeType_INVALID
}
func (m *NodeInfoResponse) GetOperator() *NodeOperator {
if m != nil {
return m.Operator
}
return nil
}
func (m *NodeInfoResponse) GetCapacity() *NodeCapacity {
if m != nil {
return m.Capacity
}
return nil
}
type FindNearRequest struct {
Id NodeID `protobuf:"bytes,1,opt,name=id,proto3,customtype=NodeID" json:"id"`
Start NodeID `protobuf:"bytes,2,opt,name=start,proto3,customtype=NodeID" json:"start"`
@ -681,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_3c76240ddc9521cd, []int{16}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{18}
}
func (m *FindNearRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FindNearRequest.Unmarshal(m, b)
@ -719,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_3c76240ddc9521cd, []int{17}
return fileDescriptor_inspector_0f6ce43677df14a8, []int{19}
}
func (m *FindNearResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FindNearResponse.Unmarshal(m, b)
@ -763,6 +856,8 @@ func init() {
proto.RegisterType((*PingNodeResponse)(nil), "inspector.PingNodeResponse")
proto.RegisterType((*LookupNodeRequest)(nil), "inspector.LookupNodeRequest")
proto.RegisterType((*LookupNodeResponse)(nil), "inspector.LookupNodeResponse")
proto.RegisterType((*NodeInfoRequest)(nil), "inspector.NodeInfoRequest")
proto.RegisterType((*NodeInfoResponse)(nil), "inspector.NodeInfoResponse")
proto.RegisterType((*FindNearRequest)(nil), "inspector.FindNearRequest")
proto.RegisterType((*FindNearResponse)(nil), "inspector.FindNearResponse")
}
@ -781,10 +876,12 @@ const _ = grpc.SupportPackageIsVersion4
type KadInspectorClient interface {
// CountNodes returns the number of nodes in the routing table
CountNodes(ctx context.Context, in *CountNodesRequest, opts ...grpc.CallOption) (*CountNodesResponse, error)
// PingNodes sends a PING RPC to a node and returns it's availability
// PingNode sends a PING RPC to a node and returns its availability
PingNode(ctx context.Context, in *PingNodeRequest, opts ...grpc.CallOption) (*PingNodeResponse, error)
// LookupNode triggers a Kademlia FindNode and returns the response
LookupNode(ctx context.Context, in *LookupNodeRequest, opts ...grpc.CallOption) (*LookupNodeResponse, error)
// NodeInfo sends a PING RPC to a node and returns its local info
NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error)
// FindNear returns limit number of IDs "near" the Start ID
FindNear(ctx context.Context, in *FindNearRequest, opts ...grpc.CallOption) (*FindNearResponse, error)
}
@ -824,6 +921,15 @@ func (c *kadInspectorClient) LookupNode(ctx context.Context, in *LookupNodeReque
return out, nil
}
func (c *kadInspectorClient) NodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) {
out := new(NodeInfoResponse)
err := c.cc.Invoke(ctx, "/inspector.KadInspector/NodeInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *kadInspectorClient) FindNear(ctx context.Context, in *FindNearRequest, opts ...grpc.CallOption) (*FindNearResponse, error) {
out := new(FindNearResponse)
err := c.cc.Invoke(ctx, "/inspector.KadInspector/FindNear", in, out, opts...)
@ -837,10 +943,12 @@ func (c *kadInspectorClient) FindNear(ctx context.Context, in *FindNearRequest,
type KadInspectorServer interface {
// CountNodes returns the number of nodes in the routing table
CountNodes(context.Context, *CountNodesRequest) (*CountNodesResponse, error)
// PingNodes sends a PING RPC to a node and returns it's availability
// PingNode sends a PING RPC to a node and returns its availability
PingNode(context.Context, *PingNodeRequest) (*PingNodeResponse, error)
// LookupNode triggers a Kademlia FindNode and returns the response
LookupNode(context.Context, *LookupNodeRequest) (*LookupNodeResponse, error)
// NodeInfo sends a PING RPC to a node and returns its local info
NodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoResponse, error)
// FindNear returns limit number of IDs "near" the Start ID
FindNear(context.Context, *FindNearRequest) (*FindNearResponse, error)
}
@ -903,6 +1011,24 @@ func _KadInspector_LookupNode_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _KadInspector_NodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NodeInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KadInspectorServer).NodeInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/inspector.KadInspector/NodeInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KadInspectorServer).NodeInfo(ctx, req.(*NodeInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KadInspector_FindNear_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindNearRequest)
if err := dec(in); err != nil {
@ -937,6 +1063,10 @@ var _KadInspector_serviceDesc = grpc.ServiceDesc{
MethodName: "LookupNode",
Handler: _KadInspector_LookupNode_Handler,
},
{
MethodName: "NodeInfo",
Handler: _KadInspector_NodeInfo_Handler,
},
{
MethodName: "FindNear",
Handler: _KadInspector_FindNear_Handler,
@ -1113,51 +1243,57 @@ var _StatDBInspector_serviceDesc = grpc.ServiceDesc{
Metadata: "inspector.proto",
}
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_inspector_3c76240ddc9521cd) }
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_inspector_0f6ce43677df14a8) }
var fileDescriptor_inspector_3c76240ddc9521cd = []byte{
// 673 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcb, 0x6e, 0x13, 0x31,
0x14, 0x65, 0x26, 0x8f, 0xa6, 0x37, 0x51, 0x93, 0xba, 0x45, 0x8a, 0x42, 0x69, 0x83, 0x85, 0xa0,
0xea, 0x22, 0x42, 0x81, 0x15, 0x12, 0x9b, 0xa4, 0xa2, 0x44, 0x2d, 0x05, 0x4d, 0xc5, 0x06, 0x81,
0x2a, 0x37, 0xb6, 0x2a, 0x2b, 0x4d, 0x3c, 0x8c, 0x3d, 0x48, 0xfc, 0x0a, 0x6b, 0xd6, 0x7c, 0x07,
0xdf, 0xc0, 0xa2, 0x1b, 0x7e, 0x04, 0xd9, 0x9e, 0x89, 0xe7, 0xd1, 0xa8, 0x15, 0x12, 0xbb, 0xf1,
0x3d, 0x67, 0xce, 0x7d, 0x1c, 0x3f, 0xa0, 0xcd, 0x17, 0x32, 0x64, 0x53, 0x25, 0xa2, 0x41, 0x18,
0x09, 0x25, 0xd0, 0xfa, 0x32, 0xd0, 0x83, 0x4b, 0x71, 0x29, 0x6c, 0xb8, 0x07, 0x0b, 0x41, 0x99,
0xfd, 0xc6, 0x2f, 0xa1, 0x7d, 0xc4, 0xd4, 0x99, 0x22, 0x4a, 0x06, 0xec, 0x4b, 0xcc, 0xa4, 0x42,
0x4f, 0x61, 0x4d, 0x13, 0xce, 0x39, 0xed, 0x7a, 0x7d, 0x6f, 0xbf, 0x35, 0xda, 0xf8, 0x75, 0xbd,
0x77, 0xef, 0xf7, 0xf5, 0x5e, 0xfd, 0x54, 0x50, 0x36, 0x39, 0x0c, 0xea, 0x1a, 0x9e, 0x50, 0xfc,
0xdd, 0x83, 0x8e, 0xfb, 0x59, 0x86, 0x62, 0x21, 0x19, 0xda, 0x83, 0x26, 0x89, 0x29, 0x57, 0xe7,
0x53, 0x11, 0x2f, 0x94, 0x51, 0xa8, 0x04, 0x60, 0x42, 0x63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 0xd0, 0x48, 0x1d, 0x44, 0xbd,
0x0c, 0xb5, 0xb0, 0x47, 0x7a, 0x0f, 0x6e, 0xc4, 0x12, 0x91, 0x09, 0x80, 0xf3, 0x28, 0x57, 0x4f,
0xc9, 0xf9, 0x5c, 0x3d, 0x37, 0x18, 0x3b, 0x86, 0x46, 0x3a, 0xa1, 0x5c, 0x3d, 0x05, 0x97, 0x72,
0xf5, 0x14, 0x47, 0x3a, 0xfc, 0x0c, 0x9d, 0x77, 0x5f, 0x59, 0x74, 0x45, 0xbe, 0xfd, 0x8f, 0x99,
0x0d, 0x7f, 0x78, 0xd0, 0xd6, 0x77, 0xdb, 0xe1, 0xc8, 0xc9, 0x8f, 0xa1, 0x91, 0x3e, 0x3b, 0xb9,
0xba, 0x0b, 0x0f, 0x59, 0xae, 0xee, 0xd2, 0x3b, 0x75, 0x02, 0xcd, 0xcc, 0xcd, 0x89, 0x72, 0x65,
0x94, 0x9e, 0x8d, 0xde, 0xee, 0x2a, 0xd8, 0xaa, 0x8d, 0xaa, 0x1f, 0xfd, 0xf0, 0xe2, 0xa2, 0x6e,
0xde, 0xd4, 0xe7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xca, 0xf7, 0xf6, 0x6e, 0x89, 0x07, 0x00,
0x00,
var fileDescriptor_inspector_0f6ce43677df14a8 = []byte{
// 773 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xd3, 0x30,
0x14, 0x26, 0xe9, 0xcf, 0xba, 0xd3, 0xaa, 0x3f, 0xde, 0x90, 0xaa, 0x32, 0xb6, 0x62, 0x21, 0x98,
0x86, 0x54, 0xa1, 0xc2, 0x15, 0x12, 0x48, 0xb4, 0x13, 0xa3, 0xda, 0xd8, 0x50, 0x06, 0x37, 0x08,
0x34, 0x79, 0x8d, 0x99, 0xa2, 0xae, 0x71, 0x48, 0x1c, 0xa4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 0xfc, 0x63, 0x42, 0xe3, 0x90, 0xd8, 0x93, 0x64, 0x62,
0xa0, 0x09, 0x80, 0x7a, 0x17, 0xd0, 0xd6, 0x40, 0x0d, 0x97, 0xc2, 0x73, 0xd1, 0xbb, 0xbb, 0x04,
0x8d, 0x77, 0x1f, 0x43, 0x2d, 0x69, 0x5d, 0xd4, 0xcb, 0x50, 0x73, 0x97, 0xa3, 0x77, 0xe7, 0x5a,
0x2c, 0x16, 0x99, 0x00, 0xa8, 0xe6, 0xd4, 0xfc, 0x14, 0x5a, 0x5e, 0xf3, 0x73, 0x4d, 0x47, 0x8f,
0xa1, 0x96, 0x34, 0x92, 0xe6, 0x27, 0xd7, 0x9e, 0x9a, 0x9f, 0x42, 0xe7, 0x8d, 0xa1, 0x96, 0x1c,
0xb3, 0x26, 0x92, 0x2b, 0xb5, 0x26, 0x92, 0xaf, 0xcb, 0xf0, 0x13, 0xb4, 0x4f, 0xbe, 0x52, 0xff,
0x92, 0x2c, 0xfe, 0xc7, 0xc1, 0x0f, 0xbf, 0x1b, 0xd0, 0x8a, 0x26, 0xc3, 0xfe, 0x48, 0xc9, 0x8f,
0xa1, 0x96, 0x0c, 0x6d, 0xcd, 0x77, 0xee, 0x6f, 0x80, 0xe6, 0xbb, 0x30, 0xe5, 0x8f, 0xa0, 0x9e,
0x99, 0x3b, 0x48, 0xb3, 0x51, 0x18, 0xba, 0xbd, 0xed, 0x65, 0xb0, 0x54, 0x1b, 0x95, 0x3f, 0x98,
0xde, 0xf9, 0x79, 0x55, 0xfc, 0x23, 0x79, 0xf2, 0x37, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x64, 0x98,
0xc0, 0xc7, 0x08, 0x00, 0x00,
}

View File

@ -12,10 +12,12 @@ package inspector;
service KadInspector {
// CountNodes returns the number of nodes in the routing table
rpc CountNodes(CountNodesRequest) returns (CountNodesResponse);
// PingNodes sends a PING RPC to a node and returns it's availability
// PingNode sends a PING RPC to a node and returns its availability
rpc PingNode(PingNodeRequest) returns (PingNodeResponse);
// LookupNode triggers a Kademlia FindNode and returns the response
rpc LookupNode(LookupNodeRequest) returns (LookupNodeResponse);
// NodeInfo sends a PING RPC to a node and returns its local info
rpc NodeInfo(NodeInfoRequest) returns (NodeInfoResponse);
// FindNear returns limit number of IDs "near" the Start ID
rpc FindNear(FindNearRequest) returns (FindNearResponse);
}
@ -110,6 +112,17 @@ message LookupNodeResponse {
node.NodeMetadata meta = 2;
}
message NodeInfoRequest {
node.NodeAddress address = 1;
}
message NodeInfoResponse {
bytes id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
node.NodeType type = 2;
node.NodeOperator operator = 3;
node.NodeCapacity capacity = 4;
}
message FindNearRequest {
bytes id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
bytes start = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];

View File

@ -49,7 +49,7 @@ func (x NodeType) String() string {
return proto.EnumName(NodeType_name, int32(x))
}
func (NodeType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_node_d0632cceb21d65c0, []int{0}
return fileDescriptor_node_706cf6fe66bd25bc, []int{0}
}
// NodeTransport is an enum of possible transports for the overlay network
@ -70,54 +70,7 @@ func (x NodeTransport) String() string {
return proto.EnumName(NodeTransport_name, int32(x))
}
func (NodeTransport) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_node_d0632cceb21d65c0, []int{1}
}
// NodeRestrictions contains all relevant data about a nodes ability to store data
type NodeRestrictions struct {
FreeBandwidth int64 `protobuf:"varint,1,opt,name=free_bandwidth,json=freeBandwidth,proto3" json:"free_bandwidth,omitempty"`
FreeDisk int64 `protobuf:"varint,2,opt,name=free_disk,json=freeDisk,proto3" json:"free_disk,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NodeRestrictions) Reset() { *m = NodeRestrictions{} }
func (m *NodeRestrictions) String() string { return proto.CompactTextString(m) }
func (*NodeRestrictions) ProtoMessage() {}
func (*NodeRestrictions) Descriptor() ([]byte, []int) {
return fileDescriptor_node_d0632cceb21d65c0, []int{0}
}
func (m *NodeRestrictions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeRestrictions.Unmarshal(m, b)
}
func (m *NodeRestrictions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NodeRestrictions.Marshal(b, m, deterministic)
}
func (dst *NodeRestrictions) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeRestrictions.Merge(dst, src)
}
func (m *NodeRestrictions) XXX_Size() int {
return xxx_messageInfo_NodeRestrictions.Size(m)
}
func (m *NodeRestrictions) XXX_DiscardUnknown() {
xxx_messageInfo_NodeRestrictions.DiscardUnknown(m)
}
var xxx_messageInfo_NodeRestrictions proto.InternalMessageInfo
func (m *NodeRestrictions) GetFreeBandwidth() int64 {
if m != nil {
return m.FreeBandwidth
}
return 0
}
func (m *NodeRestrictions) GetFreeDisk() int64 {
if m != nil {
return m.FreeDisk
}
return 0
return fileDescriptor_node_706cf6fe66bd25bc, []int{1}
}
// TODO move statdb.Update() stuff out of here
@ -145,7 +98,7 @@ func (m *Node) Reset() { *m = Node{} }
func (m *Node) String() string { return proto.CompactTextString(m) }
func (*Node) ProtoMessage() {}
func (*Node) Descriptor() ([]byte, []int) {
return fileDescriptor_node_d0632cceb21d65c0, []int{1}
return fileDescriptor_node_706cf6fe66bd25bc, []int{0}
}
func (m *Node) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Node.Unmarshal(m, b)
@ -255,7 +208,7 @@ func (m *NodeAddress) Reset() { *m = NodeAddress{} }
func (m *NodeAddress) String() string { return proto.CompactTextString(m) }
func (*NodeAddress) ProtoMessage() {}
func (*NodeAddress) Descriptor() ([]byte, []int) {
return fileDescriptor_node_d0632cceb21d65c0, []int{2}
return fileDescriptor_node_706cf6fe66bd25bc, []int{1}
}
func (m *NodeAddress) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeAddress.Unmarshal(m, b)
@ -308,7 +261,7 @@ func (m *NodeStats) Reset() { *m = NodeStats{} }
func (m *NodeStats) String() string { return proto.CompactTextString(m) }
func (*NodeStats) ProtoMessage() {}
func (*NodeStats) Descriptor() ([]byte, []int) {
return fileDescriptor_node_d0632cceb21d65c0, []int{3}
return fileDescriptor_node_706cf6fe66bd25bc, []int{2}
}
func (m *NodeStats) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeStats.Unmarshal(m, b)
@ -377,6 +330,101 @@ func (m *NodeStats) GetUptimeSuccessCount() int64 {
return 0
}
// NodeOperator contains info about the storage node operator
type NodeOperator struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
Wallet string `protobuf:"bytes,2,opt,name=wallet,proto3" json:"wallet,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NodeOperator) Reset() { *m = NodeOperator{} }
func (m *NodeOperator) String() string { return proto.CompactTextString(m) }
func (*NodeOperator) ProtoMessage() {}
func (*NodeOperator) Descriptor() ([]byte, []int) {
return fileDescriptor_node_706cf6fe66bd25bc, []int{3}
}
func (m *NodeOperator) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeOperator.Unmarshal(m, b)
}
func (m *NodeOperator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NodeOperator.Marshal(b, m, deterministic)
}
func (dst *NodeOperator) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeOperator.Merge(dst, src)
}
func (m *NodeOperator) XXX_Size() int {
return xxx_messageInfo_NodeOperator.Size(m)
}
func (m *NodeOperator) XXX_DiscardUnknown() {
xxx_messageInfo_NodeOperator.DiscardUnknown(m)
}
var xxx_messageInfo_NodeOperator proto.InternalMessageInfo
func (m *NodeOperator) GetEmail() string {
if m != nil {
return m.Email
}
return ""
}
func (m *NodeOperator) GetWallet() string {
if m != nil {
return m.Wallet
}
return ""
}
// NodeCapacity contains all relevant data about a nodes ability to store data
type NodeCapacity struct {
FreeBandwidth int64 `protobuf:"varint,1,opt,name=free_bandwidth,json=freeBandwidth,proto3" json:"free_bandwidth,omitempty"`
FreeDisk int64 `protobuf:"varint,2,opt,name=free_disk,json=freeDisk,proto3" json:"free_disk,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NodeCapacity) Reset() { *m = NodeCapacity{} }
func (m *NodeCapacity) String() string { return proto.CompactTextString(m) }
func (*NodeCapacity) ProtoMessage() {}
func (*NodeCapacity) Descriptor() ([]byte, []int) {
return fileDescriptor_node_706cf6fe66bd25bc, []int{4}
}
func (m *NodeCapacity) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeCapacity.Unmarshal(m, b)
}
func (m *NodeCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NodeCapacity.Marshal(b, m, deterministic)
}
func (dst *NodeCapacity) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeCapacity.Merge(dst, src)
}
func (m *NodeCapacity) XXX_Size() int {
return xxx_messageInfo_NodeCapacity.Size(m)
}
func (m *NodeCapacity) XXX_DiscardUnknown() {
xxx_messageInfo_NodeCapacity.DiscardUnknown(m)
}
var xxx_messageInfo_NodeCapacity proto.InternalMessageInfo
func (m *NodeCapacity) GetFreeBandwidth() int64 {
if m != nil {
return m.FreeBandwidth
}
return 0
}
func (m *NodeCapacity) GetFreeDisk() int64 {
if m != nil {
return m.FreeDisk
}
return 0
}
// Deprecated: use NodeOperator instead
type NodeMetadata struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
Wallet string `protobuf:"bytes,2,opt,name=wallet,proto3" json:"wallet,omitempty"`
@ -389,7 +437,7 @@ func (m *NodeMetadata) Reset() { *m = NodeMetadata{} }
func (m *NodeMetadata) String() string { return proto.CompactTextString(m) }
func (*NodeMetadata) ProtoMessage() {}
func (*NodeMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_node_d0632cceb21d65c0, []int{4}
return fileDescriptor_node_706cf6fe66bd25bc, []int{5}
}
func (m *NodeMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeMetadata.Unmarshal(m, b)
@ -423,59 +471,110 @@ func (m *NodeMetadata) GetWallet() string {
return ""
}
// Deprecated: use NodeCapacity instead
type NodeRestrictions struct {
FreeBandwidth int64 `protobuf:"varint,1,opt,name=free_bandwidth,json=freeBandwidth,proto3" json:"free_bandwidth,omitempty"`
FreeDisk int64 `protobuf:"varint,2,opt,name=free_disk,json=freeDisk,proto3" json:"free_disk,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NodeRestrictions) Reset() { *m = NodeRestrictions{} }
func (m *NodeRestrictions) String() string { return proto.CompactTextString(m) }
func (*NodeRestrictions) ProtoMessage() {}
func (*NodeRestrictions) Descriptor() ([]byte, []int) {
return fileDescriptor_node_706cf6fe66bd25bc, []int{6}
}
func (m *NodeRestrictions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeRestrictions.Unmarshal(m, b)
}
func (m *NodeRestrictions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NodeRestrictions.Marshal(b, m, deterministic)
}
func (dst *NodeRestrictions) XXX_Merge(src proto.Message) {
xxx_messageInfo_NodeRestrictions.Merge(dst, src)
}
func (m *NodeRestrictions) XXX_Size() int {
return xxx_messageInfo_NodeRestrictions.Size(m)
}
func (m *NodeRestrictions) XXX_DiscardUnknown() {
xxx_messageInfo_NodeRestrictions.DiscardUnknown(m)
}
var xxx_messageInfo_NodeRestrictions proto.InternalMessageInfo
func (m *NodeRestrictions) GetFreeBandwidth() int64 {
if m != nil {
return m.FreeBandwidth
}
return 0
}
func (m *NodeRestrictions) GetFreeDisk() int64 {
if m != nil {
return m.FreeDisk
}
return 0
}
func init() {
proto.RegisterType((*NodeRestrictions)(nil), "node.NodeRestrictions")
proto.RegisterType((*Node)(nil), "node.Node")
proto.RegisterType((*NodeAddress)(nil), "node.NodeAddress")
proto.RegisterType((*NodeStats)(nil), "node.NodeStats")
proto.RegisterType((*NodeOperator)(nil), "node.NodeOperator")
proto.RegisterType((*NodeCapacity)(nil), "node.NodeCapacity")
proto.RegisterType((*NodeMetadata)(nil), "node.NodeMetadata")
proto.RegisterType((*NodeRestrictions)(nil), "node.NodeRestrictions")
proto.RegisterEnum("node.NodeType", NodeType_name, NodeType_value)
proto.RegisterEnum("node.NodeTransport", NodeTransport_name, NodeTransport_value)
}
func init() { proto.RegisterFile("node.proto", fileDescriptor_node_d0632cceb21d65c0) }
func init() { proto.RegisterFile("node.proto", fileDescriptor_node_706cf6fe66bd25bc) }
var fileDescriptor_node_d0632cceb21d65c0 = []byte{
// 652 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xc1, 0x4e, 0xdb, 0x40,
0x10, 0x86, 0x49, 0x6c, 0x9c, 0x78, 0xec, 0xa4, 0x66, 0x40, 0xc8, 0x6a, 0xd5, 0x12, 0x82, 0xaa,
0x46, 0x54, 0x4a, 0x29, 0x3d, 0x51, 0xf5, 0x92, 0x00, 0x42, 0x51, 0xdd, 0x10, 0x6d, 0x0c, 0x07,
0x2e, 0x96, 0x89, 0xb7, 0x74, 0x45, 0x88, 0x2d, 0x7b, 0x2d, 0xc4, 0x1b, 0xf6, 0xd0, 0x27, 0xe8,
0x81, 0x57, 0xe8, 0x2b, 0x54, 0xbb, 0xeb, 0x24, 0xb6, 0xaa, 0xde, 0xb2, 0xff, 0xff, 0x79, 0xc6,
0x3b, 0xff, 0xc4, 0x00, 0x8b, 0x38, 0xa2, 0xfd, 0x24, 0x8d, 0x79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6b, 0xfc, 0x5b, 0xe1, 0x90, 0x15, 0x83, 0xfb, 0x60, 0xcf, 0x43, 0x4e, 0x17,
0xb3, 0xa7, 0x60, 0xce, 0x32, 0xee, 0x36, 0x3a, 0x5a, 0x4f, 0x23, 0x56, 0xa1, 0x79, 0x2c, 0xe3,
0x78, 0x00, 0xad, 0x30, 0x8f, 0x18, 0x0f, 0xb2, 0x7c, 0x36, 0x13, 0x63, 0x69, 0x76, 0x6a, 0xbd,
0x26, 0xb1, 0xa5, 0x38, 0x55, 0x1a, 0x6e, 0xc3, 0x26, 0xcb, 0x82, 0x3c, 0x71, 0x4d, 0x69, 0xea,
0x2c, 0xbb, 0x4a, 0x44, 0x6e, 0x79, 0x12, 0x85, 0x9c, 0x06, 0x45, 0x3d, 0x17, 0xa4, 0xdb, 0x52,
0xaa, 0xa7, 0x44, 0x3c, 0x82, 0x9d, 0x02, 0xab, 0xf6, 0xb1, 0x24, 0x8c, 0xca, 0x1b, 0x94, 0xbb,
0x1d, 0x40, 0x51, 0x22, 0xc8, 0x13, 0xce, 0x1e, 0xa8, 0x6b, 0xab, 0x57, 0x52, 0xe2, 0x95, 0xd4,
0xba, 0x37, 0x60, 0x95, 0x32, 0xc3, 0x8f, 0x60, 0xf2, 0x34, 0x5c, 0x64, 0x49, 0x9c, 0x72, 0x19,
0x7f, 0xfb, 0x78, 0xbb, 0x94, 0xd7, 0xd2, 0x22, 0x6b, 0x0a, 0xdd, 0xea, 0x2a, 0x98, 0xab, 0xdc,
0xbb, 0xbf, 0xea, 0x60, 0xae, 0x02, 0xc0, 0x77, 0xd0, 0x10, 0x85, 0x82, 0xff, 0xee, 0x95, 0x21,
0xec, 0x51, 0x84, 0xaf, 0x01, 0x96, 0xd3, 0x3e, 0x39, 0x2a, 0x56, 0xd4, 0x2c, 0x94, 0x93, 0x23,
0xec, 0xc3, 0x76, 0x65, 0x02, 0x41, 0x2a, 0x42, 0x95, 0xcb, 0x55, 0x23, 0x5b, 0xe5, 0x79, 0x13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0x04, 0x00, 0x00,
var fileDescriptor_node_706cf6fe66bd25bc = []byte{
// 683 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x4e, 0xdb, 0x4a,
0x14, 0x86, 0x49, 0x6c, 0x9c, 0xf8, 0xd8, 0xc9, 0x35, 0x03, 0x42, 0xd6, 0xbd, 0xba, 0x97, 0x10,
0x74, 0xd5, 0x88, 0x4a, 0x29, 0xa5, 0x2b, 0xaa, 0x6e, 0x92, 0x80, 0x50, 0x54, 0x37, 0x89, 0x26,
0x86, 0x05, 0x1b, 0x6b, 0x88, 0xa7, 0x74, 0x44, 0x88, 0x2d, 0x7b, 0x2c, 0x94, 0x37, 0xec, 0xa2,
0x4f, 0xd0, 0x05, 0xaf, 0xd0, 0x57, 0xa8, 0x66, 0xc6, 0x26, 0x76, 0xab, 0x2e, 0x2a, 0x75, 0x17,
0xff, 0xff, 0x37, 0xe7, 0x4c, 0xce, 0x7f, 0x6c, 0x80, 0x55, 0x14, 0xd2, 0x7e, 0x9c, 0x44, 0x3c,
0x42, 0xba, 0xf8, 0xfd, 0x37, 0xdc, 0x45, 0x77, 0x91, 0x52, 0xba, 0xdf, 0x34, 0xd0, 0x27, 0x51,
0x48, 0xd1, 0x7f, 0x50, 0x67, 0xa1, 0x5b, 0xeb, 0xd4, 0x7a, 0xf6, 0xb0, 0xfd, 0xf9, 0xe9, 0x60,
0xeb, 0xeb, 0xd3, 0x81, 0x21, 0x9c, 0xf1, 0x39, 0xae, 0xb3, 0x10, 0xbd, 0x84, 0x06, 0x09, 0xc3,
0x84, 0xa6, 0xa9, 0x5b, 0xef, 0xd4, 0x7a, 0xd6, 0xe9, 0x4e, 0x5f, 0x16, 0x16, 0xc8, 0x40, 0x19,
0xb8, 0x20, 0x50, 0x17, 0x74, 0xbe, 0x8e, 0xa9, 0xab, 0x75, 0x6a, 0xbd, 0xf6, 0x69, 0x7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, 0x12, 0x2e, 0xe3, 0x6f, 0x9f, 0xee, 0x96, 0xf2,
0x2a, 0x2c, 0xbc, 0xa1, 0x90, 0x5b, 0x5d, 0x05, 0xf3, 0x39, 0xf7, 0xee, 0x97, 0x3a, 0x98, 0xcf,
0x01, 0xa0, 0x17, 0xd0, 0x10, 0x85, 0x82, 0x5f, 0xee, 0x95, 0x21, 0xec, 0x71, 0x88, 0xfe, 0x05,
0x28, 0xa6, 0x7d, 0x76, 0x22, 0x6b, 0x6a, 0xd8, 0xcc, 0x95, 0xb3, 0x13, 0xd4, 0x87, 0xdd, 0xca,
0x04, 0x82, 0x44, 0x84, 0x2a, 0x97, 0xab, 0x86, 0x77, 0xca, 0xf3, 0xc6, 0xc2, 0x10, 0xe1, 0xa9,
0xff, 0x9f, 0x83, 0xba, 0x04, 0x2d, 0xa5, 0x29, 0xe4, 0x00, 0x2c, 0x55, 0x72, 0x11, 0x65, 0x2b,
0x2e, 0x37, 0x48, 0xc3, 0x20, 0xa5, 0x91, 0x50, 0x7e, 0xee, 0xa9, 0x40, 0x43, 0x82, 0x95, 0x9e,
0x8a, 0xdf, 0xf4, 0x54, 0x60, 0x43, 0x82, 0x79, 0x4f, 0x85, 0xc8, 0x3c, 0x25, 0x52, 0xad, 0xd9,
0x94, 0x28, 0x52, 0x5e, 0xb9, 0x68, 0xf7, 0x1d, 0xd8, 0x62, 0x52, 0xd3, 0x98, 0x26, 0x84, 0x47,
0x09, 0xda, 0x83, 0x6d, 0xfa, 0x40, 0xd8, 0x52, 0x8e, 0xd3, 0xc4, 0xea, 0x01, 0xed, 0x83, 0xf1,
0x48, 0x96, 0x4b, 0xca, 0xf3, 0x34, 0xf2, 0xa7, 0x2e, 0x56, 0xa7, 0x47, 0x24, 0x26, 0x0b, 0xc6,
0xd7, 0x62, 0xed, 0x3e, 0x26, 0x94, 0x06, 0xb7, 0x64, 0x15, 0x3e, 0xb2, 0x90, 0x7f, 0x92, 0x65,
0x34, 0xdc, 0x12, 0xea, 0xb0, 0x10, 0xd1, 0x3f, 0x60, 0x4a, 0x2c, 0x64, 0xe9, 0x7d, 0x9e, 0x45,
0x53, 0x08, 0xe7, 0x2c, 0xbd, 0x2f, 0x6e, 0x54, 0xbc, 0x31, 0xbf, 0x79, 0xa3, 0x6b, 0x70, 0x7e,
0x7c, 0xb1, 0xff, 0xc4, 0xad, 0x8e, 0x27, 0xd0, 0x2c, 0x3e, 0x2e, 0xc8, 0x82, 0xc6, 0x78, 0x72,
0x3d, 0xf0, 0xc6, 0xe7, 0xce, 0x16, 0x6a, 0x81, 0x39, 0x1f, 0xf8, 0x17, 0x9e, 0x37, 0xf6, 0x2f,
0x9c, 0x9a, 0xf0, 0xe6, 0xfe, 0x14, 0x0f, 0x2e, 0x2f, 0x9c, 0x3a, 0x02, 0x30, 0xae, 0x66, 0xde,
0x78, 0xf2, 0xde, 0xd1, 0x04, 0x37, 0x9c, 0x4e, 0xfd, 0xb9, 0x8f, 0x07, 0x33, 0x47, 0x3f, 0x3e,
0x84, 0x56, 0x65, 0xf9, 0x91, 0x03, 0xb6, 0x3f, 0x9a, 0x05, 0xbe, 0x37, 0x0f, 0x2e, 0xf1, 0x6c,
0xe4, 0x6c, 0x0d, 0xf5, 0x9b, 0x7a, 0x7c, 0x7b, 0x6b, 0xc8, 0x8f, 0xe8, 0x9b, 0xef, 0x01, 0x00,
0x00, 0xff, 0xff, 0x66, 0xf8, 0x7b, 0x9e, 0x64, 0x05, 0x00, 0x00,
}

View File

@ -8,12 +8,6 @@ package node;
import "gogo.proto";
// NodeRestrictions contains all relevant data about a nodes ability to store data
message NodeRestrictions {
int64 free_bandwidth = 1;
int64 free_disk = 2;
}
// TODO move statdb.Update() stuff out of here
// Node represents a node in the overlay network
// Node is info for a updating a single storagenode, used in the Update rpc calls
@ -63,9 +57,26 @@ message NodeStats {
int64 uptime_success_count = 8;
}
// NodeOperator contains info about the storage node operator
message NodeOperator {
string email = 1;
string wallet = 2;
}
// NodeCapacity contains all relevant data about a nodes ability to store data
message NodeCapacity {
int64 free_bandwidth = 1;
int64 free_disk = 2;
}
// Deprecated: use NodeOperator instead
message NodeMetadata {
string email = 1;
string wallet = 2;
}
// Deprecated: use NodeCapacity instead
message NodeRestrictions {
int64 free_bandwidth = 1;
int64 free_disk = 2;
}

View File

@ -54,7 +54,7 @@ func (x Restriction_Operator) String() string {
return proto.EnumName(Restriction_Operator_name, int32(x))
}
func (Restriction_Operator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{11, 0}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{13, 0}
}
type Restriction_Operand int32
@ -77,7 +77,7 @@ func (x Restriction_Operand) String() string {
return proto.EnumName(Restriction_Operand_name, int32(x))
}
func (Restriction_Operand) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{11, 1}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{13, 1}
}
// LookupRequest is is request message for the lookup rpc call
@ -92,7 +92,7 @@ func (m *LookupRequest) Reset() { *m = LookupRequest{} }
func (m *LookupRequest) String() string { return proto.CompactTextString(m) }
func (*LookupRequest) ProtoMessage() {}
func (*LookupRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{0}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{0}
}
func (m *LookupRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupRequest.Unmarshal(m, b)
@ -124,7 +124,7 @@ func (m *LookupResponse) Reset() { *m = LookupResponse{} }
func (m *LookupResponse) String() string { return proto.CompactTextString(m) }
func (*LookupResponse) ProtoMessage() {}
func (*LookupResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{1}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{1}
}
func (m *LookupResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupResponse.Unmarshal(m, b)
@ -163,7 +163,7 @@ func (m *LookupRequests) Reset() { *m = LookupRequests{} }
func (m *LookupRequests) String() string { return proto.CompactTextString(m) }
func (*LookupRequests) ProtoMessage() {}
func (*LookupRequests) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{2}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{2}
}
func (m *LookupRequests) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupRequests.Unmarshal(m, b)
@ -202,7 +202,7 @@ func (m *LookupResponses) Reset() { *m = LookupResponses{} }
func (m *LookupResponses) String() string { return proto.CompactTextString(m) }
func (*LookupResponses) ProtoMessage() {}
func (*LookupResponses) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{3}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{3}
}
func (m *LookupResponses) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LookupResponses.Unmarshal(m, b)
@ -241,7 +241,7 @@ func (m *FindStorageNodesResponse) Reset() { *m = FindStorageNodesRespon
func (m *FindStorageNodesResponse) String() string { return proto.CompactTextString(m) }
func (*FindStorageNodesResponse) ProtoMessage() {}
func (*FindStorageNodesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{4}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{4}
}
func (m *FindStorageNodesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FindStorageNodesResponse.Unmarshal(m, b)
@ -284,7 +284,7 @@ func (m *FindStorageNodesRequest) Reset() { *m = FindStorageNodesRequest
func (m *FindStorageNodesRequest) String() string { return proto.CompactTextString(m) }
func (*FindStorageNodesRequest) ProtoMessage() {}
func (*FindStorageNodesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{5}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{5}
}
func (m *FindStorageNodesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FindStorageNodesRequest.Unmarshal(m, b)
@ -349,7 +349,7 @@ func (m *OverlayOptions) Reset() { *m = OverlayOptions{} }
func (m *OverlayOptions) String() string { return proto.CompactTextString(m) }
func (*OverlayOptions) ProtoMessage() {}
func (*OverlayOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{6}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{6}
}
func (m *OverlayOptions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OverlayOptions.Unmarshal(m, b)
@ -418,7 +418,7 @@ func (m *QueryRequest) Reset() { *m = QueryRequest{} }
func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
func (*QueryRequest) ProtoMessage() {}
func (*QueryRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{7}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{7}
}
func (m *QueryRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryRequest.Unmarshal(m, b)
@ -478,7 +478,7 @@ func (m *QueryResponse) Reset() { *m = QueryResponse{} }
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
func (*QueryResponse) ProtoMessage() {}
func (*QueryResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{8}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{8}
}
func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryResponse.Unmarshal(m, b)
@ -522,7 +522,7 @@ func (m *PingRequest) Reset() { *m = PingRequest{} }
func (m *PingRequest) String() string { return proto.CompactTextString(m) }
func (*PingRequest) ProtoMessage() {}
func (*PingRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{9}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{9}
}
func (m *PingRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PingRequest.Unmarshal(m, b)
@ -552,7 +552,7 @@ func (m *PingResponse) Reset() { *m = PingResponse{} }
func (m *PingResponse) String() string { return proto.CompactTextString(m) }
func (*PingResponse) ProtoMessage() {}
func (*PingResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{10}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{10}
}
func (m *PingResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PingResponse.Unmarshal(m, b)
@ -572,6 +572,91 @@ func (m *PingResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_PingResponse proto.InternalMessageInfo
// TODO: add fields that validate who is requesting the info
type InfoRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InfoRequest) Reset() { *m = InfoRequest{} }
func (m *InfoRequest) String() string { return proto.CompactTextString(m) }
func (*InfoRequest) ProtoMessage() {}
func (*InfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_9a1ccc293c87939d, []int{11}
}
func (m *InfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InfoRequest.Unmarshal(m, b)
}
func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InfoRequest.Marshal(b, m, deterministic)
}
func (dst *InfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_InfoRequest.Merge(dst, src)
}
func (m *InfoRequest) XXX_Size() int {
return xxx_messageInfo_InfoRequest.Size(m)
}
func (m *InfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_InfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_InfoRequest proto.InternalMessageInfo
type InfoResponse struct {
Type NodeType `protobuf:"varint,2,opt,name=type,proto3,enum=node.NodeType" json:"type,omitempty"`
Operator *NodeOperator `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
Capacity *NodeCapacity `protobuf:"bytes,4,opt,name=capacity,proto3" json:"capacity,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InfoResponse) Reset() { *m = InfoResponse{} }
func (m *InfoResponse) String() string { return proto.CompactTextString(m) }
func (*InfoResponse) ProtoMessage() {}
func (*InfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_9a1ccc293c87939d, []int{12}
}
func (m *InfoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InfoResponse.Unmarshal(m, b)
}
func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InfoResponse.Marshal(b, m, deterministic)
}
func (dst *InfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_InfoResponse.Merge(dst, src)
}
func (m *InfoResponse) XXX_Size() int {
return xxx_messageInfo_InfoResponse.Size(m)
}
func (m *InfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_InfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_InfoResponse proto.InternalMessageInfo
func (m *InfoResponse) GetType() NodeType {
if m != nil {
return m.Type
}
return NodeType_INVALID
}
func (m *InfoResponse) GetOperator() *NodeOperator {
if m != nil {
return m.Operator
}
return nil
}
func (m *InfoResponse) GetCapacity() *NodeCapacity {
if m != nil {
return m.Capacity
}
return nil
}
type Restriction struct {
Operator Restriction_Operator `protobuf:"varint,1,opt,name=operator,proto3,enum=overlay.Restriction_Operator" json:"operator,omitempty"`
Operand Restriction_Operand `protobuf:"varint,2,opt,name=operand,proto3,enum=overlay.Restriction_Operand" json:"operand,omitempty"`
@ -585,7 +670,7 @@ func (m *Restriction) Reset() { *m = Restriction{} }
func (m *Restriction) String() string { return proto.CompactTextString(m) }
func (*Restriction) ProtoMessage() {}
func (*Restriction) Descriptor() ([]byte, []int) {
return fileDescriptor_overlay_b711a2281a37fa0c, []int{11}
return fileDescriptor_overlay_9a1ccc293c87939d, []int{13}
}
func (m *Restriction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Restriction.Unmarshal(m, b)
@ -638,6 +723,8 @@ func init() {
proto.RegisterType((*QueryResponse)(nil), "overlay.QueryResponse")
proto.RegisterType((*PingRequest)(nil), "overlay.PingRequest")
proto.RegisterType((*PingResponse)(nil), "overlay.PingResponse")
proto.RegisterType((*InfoRequest)(nil), "overlay.InfoRequest")
proto.RegisterType((*InfoResponse)(nil), "overlay.InfoResponse")
proto.RegisterType((*Restriction)(nil), "overlay.Restriction")
proto.RegisterEnum("overlay.Restriction_Operator", Restriction_Operator_name, Restriction_Operator_value)
proto.RegisterEnum("overlay.Restriction_Operand", Restriction_Operand_name, Restriction_Operand_value)
@ -793,6 +880,7 @@ var _Overlay_serviceDesc = grpc.ServiceDesc{
type NodesClient interface {
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
RequestInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
}
type nodesClient struct {
@ -821,10 +909,20 @@ func (c *nodesClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.Ca
return out, nil
}
func (c *nodesClient) RequestInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) {
out := new(InfoResponse)
err := c.cc.Invoke(ctx, "/overlay.Nodes/RequestInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NodesServer is the server API for Nodes service.
type NodesServer interface {
Query(context.Context, *QueryRequest) (*QueryResponse, error)
Ping(context.Context, *PingRequest) (*PingResponse, error)
RequestInfo(context.Context, *InfoRequest) (*InfoResponse, error)
}
func RegisterNodesServer(s *grpc.Server, srv NodesServer) {
@ -867,6 +965,24 @@ func _Nodes_Ping_Handler(srv interface{}, ctx context.Context, dec func(interfac
return interceptor(ctx, in, info, handler)
}
func _Nodes_RequestInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodesServer).RequestInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/overlay.Nodes/RequestInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodesServer).RequestInfo(ctx, req.(*InfoRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Nodes_serviceDesc = grpc.ServiceDesc{
ServiceName: "overlay.Nodes",
HandlerType: (*NodesServer)(nil),
@ -879,66 +995,75 @@ var _Nodes_serviceDesc = grpc.ServiceDesc{
MethodName: "Ping",
Handler: _Nodes_Ping_Handler,
},
{
MethodName: "RequestInfo",
Handler: _Nodes_RequestInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "overlay.proto",
}
func init() { proto.RegisterFile("overlay.proto", fileDescriptor_overlay_b711a2281a37fa0c) }
func init() { proto.RegisterFile("overlay.proto", fileDescriptor_overlay_9a1ccc293c87939d) }
var fileDescriptor_overlay_b711a2281a37fa0c = []byte{
// 841 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xef, 0x8e, 0xdb, 0x44,
0x10, 0x3f, 0xc7, 0x89, 0x93, 0x4e, 0x12, 0x9f, 0xb5, 0x6a, 0xef, 0x82, 0x81, 0x5e, 0xb0, 0x2a,
0x38, 0x89, 0x2a, 0x85, 0x14, 0x55, 0xb4, 0x02, 0x01, 0x51, 0xd2, 0x72, 0x6a, 0xd4, 0x50, 0x27,
0x52, 0x25, 0xf8, 0x60, 0x39, 0xf1, 0x62, 0x4c, 0x1c, 0xaf, 0xf1, 0xae, 0xab, 0xbb, 0x3e, 0x01,
0x6f, 0xc2, 0xab, 0xf0, 0x0c, 0x7c, 0xb8, 0x47, 0xe0, 0x01, 0xf8, 0x84, 0xf6, 0x8f, 0x1d, 0xe7,
0xee, 0x72, 0xea, 0xa7, 0xdd, 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2e, 0x0d, 0x31, 0x5a, 0x1e, 0xff, 0x1f, 0x00, 0x00, 0xff,
0xff, 0x7b, 0x95, 0x8a, 0xf4, 0x24, 0x07, 0x00, 0x00,
var fileDescriptor_overlay_9a1ccc293c87939d = []byte{
// 913 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdd, 0x8e, 0xdb, 0x44,
0x14, 0x5e, 0xe7, 0xbf, 0x27, 0x89, 0x37, 0x1a, 0xb5, 0xbb, 0x21, 0x40, 0x37, 0x58, 0x15, 0xac,
0x44, 0x95, 0x42, 0x8a, 0x2a, 0xba, 0x02, 0x01, 0x21, 0x69, 0x89, 0x1a, 0x75, 0xe9, 0x24, 0x52,
0x25, 0xb8, 0xb0, 0x1c, 0x7b, 0x6a, 0xcc, 0x3a, 0x1e, 0xe3, 0x19, 0x57, 0x9b, 0x3e, 0x01, 0xd7,
0xbc, 0x04, 0xb7, 0x3c, 0x06, 0xcf, 0xc0, 0xc5, 0x3e, 0x02, 0x0f, 0xc0, 0x15, 0x9a, 0x1f, 0x3b,
0xce, 0x6e, 0x52, 0xf5, 0xca, 0x3e, 0xe7, 0xfb, 0xbe, 0x99, 0xf9, 0xce, 0x9c, 0x33, 0xd0, 0xa6,
0xaf, 0x49, 0x12, 0x3a, 0xeb, 0x41, 0x9c, 0x50, 0x4e, 0x51, 0x5d, 0x87, 0xbd, 0xbb, 0x3e, 0xa5,
0x7e, 0x48, 0x1e, 0xc8, 0xf4, 0x32, 0x7d, 0xf5, 0xc0, 0x4b, 0x13, 0x87, 0x07, 0x34, 0x52, 0xc4,
0x1e, 0xf8, 0xd4, 0xa7, 0xd9, 0x7f, 0x44, 0x3d, 0xa2, 0xfe, 0xad, 0x2f, 0xa1, 0x3d, 0xa3, 0xf4,
0x22, 0x8d, 0x31, 0xf9, 0x2d, 0x25, 0x8c, 0xa3, 0x4f, 0xa0, 0x2e, 0x60,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xa7, 0x52, 0xbc, 0x5c, 0xd6, 0xe4,
0xdb, 0xf9, 0xf0, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0x04, 0xec, 0x6f, 0x05, 0x08, 0x00,
0x00,
}

View File

@ -23,6 +23,7 @@ service Overlay {
service Nodes {
rpc Query(QueryRequest) returns (QueryResponse);
rpc Ping(PingRequest) returns (PingResponse);
rpc RequestInfo(InfoRequest) returns (InfoResponse);
}
// LookupRequest is is request message for the lookup rpc call
@ -85,6 +86,15 @@ message QueryResponse {
message PingRequest {};
message PingResponse {};
// TODO: add fields that validate who is requesting the info
message InfoRequest {}
message InfoResponse {
node.NodeType type = 2;
node.NodeOperator operator = 3;
node.NodeCapacity capacity = 4;
}
message Restriction {
enum Operator {
LT = 0;