talos/internal/app/osd/proto/api.proto
Brad Beam 692571bdec feat(networkd): Add grpc endpoint
Allows us to list routes and interface details

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-25 19:48:08 -07:00

95 lines
2.4 KiB
Protocol Buffer

syntax = "proto3";
package proto;
import "google/protobuf/empty.proto";
// The OSD service definition.
//
// OSD Service also implements all the API of Init Service
service OSD {
rpc Dmesg(google.protobuf.Empty) returns (Data) {}
rpc Kubeconfig(google.protobuf.Empty) returns (Data) {}
rpc Logs(LogsRequest) returns (stream Data) {}
rpc Processes(ProcessesRequest) returns (ProcessesReply) {}
rpc Restart(RestartRequest) returns (RestartReply) {}
rpc Stats(StatsRequest) returns (StatsReply) {}
rpc Top(google.protobuf.Empty) returns (TopReply) {}
rpc Version(google.protobuf.Empty) returns (Data) {}
}
enum ContainerDriver {
CONTAINERD = 0;
CRI = 1;
}
// The request message containing the containerd namespace.
message ProcessesRequest {
string namespace = 1;
// driver might be default "containerd" or "cri"
ContainerDriver driver = 2;
}
// The response message containing the requested processes.
message ProcessesReply { repeated Process processes = 1; }
// The response message containing the requested processes.
message Process {
string namespace = 1;
string id = 2;
string image = 3;
uint32 pid = 4;
string status = 5;
string pod_id = 6;
string name = 7;
}
// The request message containing the containerd namespace.
message StatsRequest {
string namespace = 1;
// driver might be default "containerd" or "cri"
ContainerDriver driver = 2;
}
// The response message containing the requested stats.
message StatsReply { repeated Stat stats = 1; }
// The response message containing the requested stat.
message Stat {
string namespace = 1;
string id = 2;
uint64 memory_usage = 4;
uint64 cpu_usage = 5;
string pod_id = 6;
string name = 7;
}
// The request message containing the process to restart.
message RestartRequest {
string namespace = 1;
string id = 2;
// driver might be default "containerd" or "cri"
ContainerDriver driver = 3;
}
// The response message containing the restart status.
message RestartReply {}
// The request message containing the process name.
message LogsRequest {
string namespace = 1;
string id = 2;
// driver might be default "containerd" or "cri"
ContainerDriver driver = 3;
}
// The response message containing the requested logs.
message Data { bytes bytes = 1; }
message TopRequest {}
message TopReply { ProcessList process_list = 1; }
message ProcessList { bytes bytes = 1; }