79 lines
1.7 KiB
Protocol Buffer
79 lines
1.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package healthchecker;
|
|
|
|
option go_package = "git.ipng.ch/ipng/vpp-maglev/internal/grpcapi";
|
|
|
|
// HealthChecker exposes the state of backend health for all VIPs.
|
|
service HealthChecker {
|
|
rpc ListVIPs(ListVIPsRequest) returns (ListVIPsResponse);
|
|
rpc GetVIP(GetVIPRequest) returns (VIPInfo);
|
|
rpc ListBackends(ListBackendsRequest) returns (ListBackendsResponse);
|
|
rpc GetBackend(GetBackendRequest) returns (BackendInfo);
|
|
rpc PauseBackend(PauseResumeRequest) returns (BackendInfo);
|
|
rpc ResumeBackend(PauseResumeRequest) returns (BackendInfo);
|
|
rpc WatchTransitions(WatchRequest) returns (stream TransitionEvent);
|
|
}
|
|
|
|
// ---- requests ---------------------------------------------------------------
|
|
|
|
message ListVIPsRequest {}
|
|
|
|
message GetVIPRequest {
|
|
string vip_name = 1;
|
|
}
|
|
|
|
message ListBackendsRequest {
|
|
string vip_name = 1;
|
|
}
|
|
|
|
message GetBackendRequest {
|
|
string vip_name = 1;
|
|
string backend_address = 2;
|
|
}
|
|
|
|
message PauseResumeRequest {
|
|
string vip_name = 1;
|
|
string backend_address = 2;
|
|
}
|
|
|
|
message WatchRequest {}
|
|
|
|
// ---- responses --------------------------------------------------------------
|
|
|
|
message ListVIPsResponse {
|
|
repeated string vip_names = 1;
|
|
}
|
|
|
|
message VIPInfo {
|
|
string name = 1;
|
|
string address = 2;
|
|
string protocol = 3;
|
|
uint32 port = 4;
|
|
repeated string backends = 5;
|
|
string description = 6;
|
|
}
|
|
|
|
message ListBackendsResponse {
|
|
repeated BackendInfo backends = 1;
|
|
}
|
|
|
|
message BackendInfo {
|
|
string vip_name = 1;
|
|
string address = 2;
|
|
string state = 3;
|
|
repeated TransitionRecord transitions = 4;
|
|
}
|
|
|
|
message TransitionRecord {
|
|
string from = 1;
|
|
string to = 2;
|
|
int64 at_unix_ns = 3;
|
|
}
|
|
|
|
message TransitionEvent {
|
|
string vip_name = 1;
|
|
string backend_address = 2;
|
|
TransitionRecord transition = 3;
|
|
}
|