58 lines
1.5 KiB
Protocol Buffer
58 lines
1.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package nova.management.v1alpha;
|
|
|
|
message Empty {}
|
|
|
|
// Represents the status of a shard
|
|
enum ShardStatus {
|
|
DISCONNECTED = 0;
|
|
RUNNING = 1;
|
|
RECONNECTING = 2;
|
|
}
|
|
|
|
// represents the state of a nova shard
|
|
message ShardStatusResponse {
|
|
// Status of the shard in the cluster
|
|
ShardStatus status = 1;
|
|
// Index of the discord shard
|
|
int64 identifier = 2;
|
|
// If the cluster have a node assigned
|
|
string cluster = 3;
|
|
// the websocket latency of the shard
|
|
int64 latency = 4;
|
|
}
|
|
|
|
message ShardStatusRequest {
|
|
// the id of the shard
|
|
int64 identifier = 1;
|
|
}
|
|
|
|
// represents the status of a cluster
|
|
// (an instance of the gateway which holds multiple shards)
|
|
message ClusterStatusResponse {
|
|
// the unique id of the cluster
|
|
string id = 1;
|
|
// the node the cluster is running on
|
|
string node = 2;
|
|
// the average latency of the cluster
|
|
int64 average_latency = 3;
|
|
// list of all the shards on the cluster
|
|
repeated ShardStatusResponse shards = 4;
|
|
}
|
|
|
|
message ClusterStatusRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
// Represents the status of all the nova clusters & shards
|
|
message GlobalClusterStatusResponse {
|
|
int64 size = 1;
|
|
repeated ClusterStatusResponse shards = 2;
|
|
}
|
|
|
|
// used by the cli to interact with the nova manager
|
|
service ManagementService {
|
|
rpc GetGlobalClusterStatus (Empty) returns (GlobalClusterStatusResponse);
|
|
rpc GetClusterStatus (ClusterStatusRequest) returns (ClusterStatusResponse);
|
|
rpc GetShardStatus (ShardStatusRequest) returns (ShardStatusResponse);
|
|
} |