storj/pkg/pb/inspector.proto
Maximillian von Briesen 06cf1c71ed
Statdb inspection tool (#626)
* begin adding stadb inspection tool

* add command for creating statdb nodes from csv

* add getCSVStats and create helper func for getting sdb client

* fix createcsvstats, add createstats

* fix linter errors
2018-11-21 17:01:09 -05:00

85 lines
1.8 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 {
// Kad/Overlay commands:
// 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);
// StatDB commands:
// GetStats returns the stats for a particular node ID
rpc GetStats(GetStatsRequest) returns (GetStatsResponse);
// CreateStats creates a node with specified stats
rpc CreateStats(CreateStatsRequest) returns (CreateStatsResponse);
}
// GetStats
message GetStatsRequest {
string node_id = 1;
}
message GetStatsResponse {
int64 audit_count = 1;
double uptime_ratio = 2;
double audit_ratio = 3;
}
// CreateStats
message CreateStatsRequest {
string node_id = 1;
int64 audit_count = 2;
int64 audit_success_count = 3;
int64 uptime_count = 4;
int64 uptime_success_count = 5;
}
message CreateStatsResponse {
}
// 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;
}