mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
159 lines
3.0 KiB
Protocol Buffer
159 lines
3.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package = "github.com/ava-labs/avalanche-network-runner;rpcpb";
|
|
|
|
package rpcpb;
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
service PingService {
|
|
rpc Ping(PingRequest) returns (PingResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/ping"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message PingRequest {}
|
|
|
|
message PingResponse {
|
|
int32 pid = 1;
|
|
}
|
|
|
|
service ControlService {
|
|
rpc Start(StartRequest) returns (StartResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/start"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc Health(HealthRequest) returns (HealthResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/health"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc URIs(URIsRequest) returns (URIsResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/uris"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc Status(StatusRequest) returns (StatusResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/status"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc StreamStatus(StreamStatusRequest) returns (stream StreamStatusResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/streamstatus"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc RemoveNode(RemoveNodeRequest) returns (RemoveNodeResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/removenode"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc RestartNode(RestartNodeRequest) returns (RestartNodeResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/restartnode"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc Stop(StopRequest) returns (StopResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/control/stop"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message ClusterInfo {
|
|
repeated string node_names = 1;
|
|
map<string, NodeInfo> node_infos = 2;
|
|
int32 pid = 3;
|
|
string root_data_dir = 4;
|
|
bool healthy = 5;
|
|
}
|
|
|
|
message NodeInfo {
|
|
string name = 1;
|
|
string exec_path = 2;
|
|
string uri = 3;
|
|
string id = 4;
|
|
string log_dir = 5;
|
|
string db_dir = 6;
|
|
string whitelisted_subnets = 7;
|
|
bytes config = 8;
|
|
}
|
|
|
|
message StartRequest {
|
|
string exec_path = 1;
|
|
optional string whitelisted_subnets = 2;
|
|
optional string log_level = 3;
|
|
}
|
|
|
|
message StartResponse {
|
|
ClusterInfo cluster_info = 1;
|
|
}
|
|
|
|
message HealthRequest {}
|
|
|
|
message HealthResponse {
|
|
ClusterInfo cluster_info = 1;
|
|
}
|
|
|
|
message URIsRequest {}
|
|
|
|
message URIsResponse {
|
|
repeated string uris = 1;
|
|
}
|
|
|
|
message StatusRequest {}
|
|
|
|
message StatusResponse {
|
|
ClusterInfo cluster_info = 1;
|
|
}
|
|
|
|
message StreamStatusRequest {
|
|
int64 push_interval = 1;
|
|
}
|
|
|
|
message StreamStatusResponse {
|
|
ClusterInfo cluster_info = 1;
|
|
}
|
|
|
|
message RestartNodeRequest {
|
|
string name = 1;
|
|
StartRequest start_request = 2;
|
|
}
|
|
|
|
message RestartNodeResponse {
|
|
ClusterInfo cluster_info = 1;
|
|
}
|
|
|
|
message RemoveNodeRequest {
|
|
string name = 1;
|
|
}
|
|
|
|
message RemoveNodeResponse {
|
|
ClusterInfo cluster_info = 1;
|
|
}
|
|
|
|
message StopRequest {}
|
|
|
|
message StopResponse {
|
|
ClusterInfo cluster_info = 1;
|
|
}
|