62 lines
1.2 KiB
Protocol Buffer
62 lines
1.2 KiB
Protocol Buffer
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
syntax = "proto3";
|
|
option go_package = "pb";
|
|
|
|
import "gogo.proto";
|
|
import "node.proto";
|
|
import "vouchers.proto";
|
|
|
|
package overlay;
|
|
|
|
service Nodes {
|
|
rpc Query(QueryRequest) returns (QueryResponse);
|
|
rpc Ping(PingRequest) returns (PingResponse);
|
|
rpc RequestInfo(InfoRequest) returns (InfoResponse);
|
|
}
|
|
|
|
message QueryRequest {
|
|
node.Node sender = 1;
|
|
node.Node target = 2;
|
|
int64 limit = 3;
|
|
bool pingback = 4;
|
|
repeated vouchers.Voucher vouchers = 5;
|
|
}
|
|
|
|
message QueryResponse {
|
|
node.Node sender = 1;
|
|
repeated node.Node response = 2;
|
|
}
|
|
|
|
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;
|
|
node.NodeVersion version = 5;
|
|
}
|
|
|
|
message Restriction {
|
|
enum Operator {
|
|
LT = 0;
|
|
EQ = 1;
|
|
GT = 2;
|
|
LTE = 3;
|
|
GTE = 4;
|
|
}
|
|
enum Operand {
|
|
FREE_BANDWIDTH = 0;
|
|
FREE_DISK = 1;
|
|
}
|
|
|
|
Operator operator = 1;
|
|
Operand operand = 2;
|
|
int64 value = 3;
|
|
}
|