storj/pkg/pb/inspector.proto
Dylan Lott 0d05cb26bf
Kademlia Inspector CLI (#657)
* initial commit of inspector gadget wireup

* change name of comman dline tool, setup grpc server

* Get inspector cli working with grpc client

* Wired up CountNodes command

* WIP getting buckets response working

* Added GetBucket command

* WIP working on get buckets command

* WIP working on bucket list

* Still WIP

* WIP getting bucket counts to work

* Some clean up of unnecessary changes

* List Buckets and Get Bucket are working

* Removing logs, getting ready for review

* initial commit of inspector gadget wireup

* change name of comman dline tool, setup grpc server

* Get inspector cli working with grpc client

* Wired up CountNodes command

* WIP getting buckets response working

* Added GetBucket command

* WIP working on get buckets command

* WIP working on bucket list

* Still WIP

* WIP getting bucket counts to work

* Some clean up of unnecessary changes

* List Buckets and Get Bucket are working

* Removing logs, getting ready for review

* Fix error return

* Trying to get tests passing

* Adds method on dht mock for tests

* Add dbx files back

* Fix package import error in dbx file

* Adds copyrights to pass linter

* tidy go mod

* Updates from code review

* Updates inspector to take flag arguments for address

* Format list-buckets output more prettier
2018-11-21 10:31:27 -07:00

57 lines
1.1 KiB
Protocol Buffer

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
syntax = "proto3";
option go_package = "pb";
import "overlay.proto";
package inspector;
service Inspector {
// CountNodes returns the number of nodes in the cache and in the routing table
rpc CountNodes(CountNodesRequest) returns (CountNodesResponse);
// GetBuckets returns the k buckets from a Kademlia instance
rpc GetBuckets(GetBucketsRequest) returns (GetBucketsResponse);
// GetBucket returns the details of a single k bucket from the kademlia instance
rpc GetBucket(GetBucketRequest) returns (GetBucketResponse);
}
// CountNodes
message CountNodesResponse {
int64 kademlia = 1;
int64 overlay = 2;
}
message CountNodesRequest {
}
// GetBuckets
message GetBucketsRequest {
}
message GetBucketsResponse {
int64 total = 1;
repeated bytes ids = 2;
}
// GetBucket
message GetBucketRequest {
string id = 1;
}
message GetBucketResponse {
string id = 1;
repeated overlay.Node nodes = 2;
}
message Bucket {
repeated overlay.Node nodes = 2;
}
message BucketList {
repeated overlay.Node nodes = 1;
}