Pools, CLI, versioning, Debian packaging, HTTPS fix

- Replaced flat `backends: [...]` list on frontends with an ordered `pools:`
  list; each pool has a name and a map of backends with per-pool weights (0–100,
  default 100). Pools express priority: first pool with a healthy backend wins.
- Removed global backend weight (was on the backend, now lives in the pool).
- Config validation enforces non-empty pools, non-empty pool names, weight
  range, and consistent address families across all pools of a frontend.

- Added `PoolBackendInfo { name, weight }` and changed `PoolInfo.backends` from
  `repeated string` to `repeated PoolBackendInfo` so weights are visible over
  the API.

- Full interactive shell with readline, tab completion, and `?` inline help.
- Command tree parser (Walk) handles fixed keywords and dynamic slot nodes;
  prefix matching with exact-match priority.
- Commands: `show version/frontends/frontend/backends/backend/healthchecks/
  healthcheck`, `set backend <name> pause|resume`, `quit`/`exit`.
- `show frontend` output is hierarchical (pools → backends) with per-backend
  weights and `[disabled]` notation; pool section uses fixed-width formatting
  so ANSI color codes don't corrupt tabwriter alignment.
- `-color` flag (default true) wraps static field labels in dark-blue ANSI;
  works correctly with tabwriter because all labels carry identical-length
  escape sequences.

- `cmd/version.go` package holds `version`, `commit`, `date` vars set at build
  time via `-ldflags -X`.
- `make build` / `make build-amd64` / `make build-arm64` all inject
  `VERSION=0.1.1`, `COMMIT_HASH` (from `git rev-parse --short HEAD`), and
  `DATE` (UTC ISO-8601).
- `maglevc` prints version on interactive startup and exposes `show version`.
- `maglevd` logs version/commit/date at startup; `-version` flag prints and exits.

- `doHTTPProbe` was building a `https://` target URL even though TLS was already
  applied to the connection inside `inNetns`. `http.Transport` then wrapped the
  connection in a second TLS layer, producing "http: server gave HTTP response
  to HTTPS client". Fixed by always using `http://` in the target URL.
- Added `TestHTTPSProbe` using `httptest.NewTLSServer` to cover the full path.

- New `docs/user-guide.md`: maglevd flags/signals, maglevc commands, shell
  completion, and command-tree parser walkthrough.
- New `docs/healthchecks.md`: state machine, rise/fall model, probe intervals,
  all transition events with log examples.
- Updated `docs/config-guide.md`: pools design, removed global weight from
  backends, updated all examples.
- Updated `README.md`: packaging table, build paths, corrected binary locations
  (`/usr/sbin/maglevd`), config filename (`.yaml`).

- `debian/` directory contains `control.in`, `maglevd.service`, `default.maglev`,
  `maglev.yaml` (example config), `conffiles`, `postinst`, `prerm`.
- `debian/build-deb.sh` stages a package tree and calls `dpkg-deb`; emits
  `build/vpp-maglev_<version>~<commit>_<arch>.deb`.
- Cross-compiles for amd64 and arm64 in one `make pkg-deb` invocation.
- `maglevd` installed to `/usr/sbin/`, `maglevc` to `/usr/bin/`.
- Service reads `MAGLEV_CONFIG` from `/etc/default/maglev`
  (default: `/etc/maglev/maglev.yaml`).
- Man pages `maglevd(8)` and `maglevc(1)` live in `docs/` and are gzip'd into
  the package.
- All build output goes to `build/<arch>/`; `build/` is gitignored.
This commit is contained in:
2026-04-11 12:18:17 +02:00
parent ad7d7e20fc
commit d612086a5f
31 changed files with 1471 additions and 282 deletions

View File

@@ -385,13 +385,117 @@ func (x *ListFrontendsResponse) GetFrontendNames() []string {
return nil
}
type PoolBackendInfo struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PoolBackendInfo) Reset() {
*x = PoolBackendInfo{}
mi := &file_proto_maglev_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PoolBackendInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PoolBackendInfo) ProtoMessage() {}
func (x *PoolBackendInfo) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PoolBackendInfo.ProtoReflect.Descriptor instead.
func (*PoolBackendInfo) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{9}
}
func (x *PoolBackendInfo) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PoolBackendInfo) GetWeight() int32 {
if x != nil {
return x.Weight
}
return 0
}
type PoolInfo struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Backends []*PoolBackendInfo `protobuf:"bytes,2,rep,name=backends,proto3" json:"backends,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PoolInfo) Reset() {
*x = PoolInfo{}
mi := &file_proto_maglev_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PoolInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PoolInfo) ProtoMessage() {}
func (x *PoolInfo) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PoolInfo.ProtoReflect.Descriptor instead.
func (*PoolInfo) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{10}
}
func (x *PoolInfo) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PoolInfo) GetBackends() []*PoolBackendInfo {
if x != nil {
return x.Backends
}
return nil
}
type FrontendInfo struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
BackendNames []string `protobuf:"bytes,5,rep,name=backend_names,json=backendNames,proto3" json:"backend_names,omitempty"`
Pools []*PoolInfo `protobuf:"bytes,5,rep,name=pools,proto3" json:"pools,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
@@ -399,7 +503,7 @@ type FrontendInfo struct {
func (x *FrontendInfo) Reset() {
*x = FrontendInfo{}
mi := &file_proto_maglev_proto_msgTypes[9]
mi := &file_proto_maglev_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -411,7 +515,7 @@ func (x *FrontendInfo) String() string {
func (*FrontendInfo) ProtoMessage() {}
func (x *FrontendInfo) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[9]
mi := &file_proto_maglev_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -424,7 +528,7 @@ func (x *FrontendInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use FrontendInfo.ProtoReflect.Descriptor instead.
func (*FrontendInfo) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{9}
return file_proto_maglev_proto_rawDescGZIP(), []int{11}
}
func (x *FrontendInfo) GetName() string {
@@ -455,9 +559,9 @@ func (x *FrontendInfo) GetPort() uint32 {
return 0
}
func (x *FrontendInfo) GetBackendNames() []string {
func (x *FrontendInfo) GetPools() []*PoolInfo {
if x != nil {
return x.BackendNames
return x.Pools
}
return nil
}
@@ -478,7 +582,7 @@ type ListBackendsResponse struct {
func (x *ListBackendsResponse) Reset() {
*x = ListBackendsResponse{}
mi := &file_proto_maglev_proto_msgTypes[10]
mi := &file_proto_maglev_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -490,7 +594,7 @@ func (x *ListBackendsResponse) String() string {
func (*ListBackendsResponse) ProtoMessage() {}
func (x *ListBackendsResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[10]
mi := &file_proto_maglev_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -503,7 +607,7 @@ func (x *ListBackendsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListBackendsResponse.ProtoReflect.Descriptor instead.
func (*ListBackendsResponse) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{10}
return file_proto_maglev_proto_rawDescGZIP(), []int{12}
}
func (x *ListBackendsResponse) GetBackendNames() []string {
@@ -522,7 +626,7 @@ type ListHealthChecksResponse struct {
func (x *ListHealthChecksResponse) Reset() {
*x = ListHealthChecksResponse{}
mi := &file_proto_maglev_proto_msgTypes[11]
mi := &file_proto_maglev_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -534,7 +638,7 @@ func (x *ListHealthChecksResponse) String() string {
func (*ListHealthChecksResponse) ProtoMessage() {}
func (x *ListHealthChecksResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[11]
mi := &file_proto_maglev_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -547,7 +651,7 @@ func (x *ListHealthChecksResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListHealthChecksResponse.ProtoReflect.Descriptor instead.
func (*ListHealthChecksResponse) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{11}
return file_proto_maglev_proto_rawDescGZIP(), []int{13}
}
func (x *ListHealthChecksResponse) GetNames() []string {
@@ -572,7 +676,7 @@ type HTTPCheckParams struct {
func (x *HTTPCheckParams) Reset() {
*x = HTTPCheckParams{}
mi := &file_proto_maglev_proto_msgTypes[12]
mi := &file_proto_maglev_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -584,7 +688,7 @@ func (x *HTTPCheckParams) String() string {
func (*HTTPCheckParams) ProtoMessage() {}
func (x *HTTPCheckParams) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[12]
mi := &file_proto_maglev_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -597,7 +701,7 @@ func (x *HTTPCheckParams) ProtoReflect() protoreflect.Message {
// Deprecated: Use HTTPCheckParams.ProtoReflect.Descriptor instead.
func (*HTTPCheckParams) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{12}
return file_proto_maglev_proto_rawDescGZIP(), []int{14}
}
func (x *HTTPCheckParams) GetPath() string {
@@ -660,7 +764,7 @@ type TCPCheckParams struct {
func (x *TCPCheckParams) Reset() {
*x = TCPCheckParams{}
mi := &file_proto_maglev_proto_msgTypes[13]
mi := &file_proto_maglev_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -672,7 +776,7 @@ func (x *TCPCheckParams) String() string {
func (*TCPCheckParams) ProtoMessage() {}
func (x *TCPCheckParams) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[13]
mi := &file_proto_maglev_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -685,7 +789,7 @@ func (x *TCPCheckParams) ProtoReflect() protoreflect.Message {
// Deprecated: Use TCPCheckParams.ProtoReflect.Descriptor instead.
func (*TCPCheckParams) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{13}
return file_proto_maglev_proto_rawDescGZIP(), []int{15}
}
func (x *TCPCheckParams) GetSsl() bool {
@@ -730,7 +834,7 @@ type HealthCheckInfo struct {
func (x *HealthCheckInfo) Reset() {
*x = HealthCheckInfo{}
mi := &file_proto_maglev_proto_msgTypes[14]
mi := &file_proto_maglev_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -742,7 +846,7 @@ func (x *HealthCheckInfo) String() string {
func (*HealthCheckInfo) ProtoMessage() {}
func (x *HealthCheckInfo) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[14]
mi := &file_proto_maglev_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -755,7 +859,7 @@ func (x *HealthCheckInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use HealthCheckInfo.ProtoReflect.Descriptor instead.
func (*HealthCheckInfo) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{14}
return file_proto_maglev_proto_rawDescGZIP(), []int{16}
}
func (x *HealthCheckInfo) GetName() string {
@@ -856,15 +960,14 @@ type BackendInfo struct {
State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
Transitions []*TransitionRecord `protobuf:"bytes,4,rep,name=transitions,proto3" json:"transitions,omitempty"`
Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"`
Weight int32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"`
Healthcheck string `protobuf:"bytes,7,opt,name=healthcheck,proto3" json:"healthcheck,omitempty"`
Healthcheck string `protobuf:"bytes,6,opt,name=healthcheck,proto3" json:"healthcheck,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BackendInfo) Reset() {
*x = BackendInfo{}
mi := &file_proto_maglev_proto_msgTypes[15]
mi := &file_proto_maglev_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -876,7 +979,7 @@ func (x *BackendInfo) String() string {
func (*BackendInfo) ProtoMessage() {}
func (x *BackendInfo) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[15]
mi := &file_proto_maglev_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -889,7 +992,7 @@ func (x *BackendInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use BackendInfo.ProtoReflect.Descriptor instead.
func (*BackendInfo) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{15}
return file_proto_maglev_proto_rawDescGZIP(), []int{17}
}
func (x *BackendInfo) GetName() string {
@@ -927,13 +1030,6 @@ func (x *BackendInfo) GetEnabled() bool {
return false
}
func (x *BackendInfo) GetWeight() int32 {
if x != nil {
return x.Weight
}
return 0
}
func (x *BackendInfo) GetHealthcheck() string {
if x != nil {
return x.Healthcheck
@@ -952,7 +1048,7 @@ type TransitionRecord struct {
func (x *TransitionRecord) Reset() {
*x = TransitionRecord{}
mi := &file_proto_maglev_proto_msgTypes[16]
mi := &file_proto_maglev_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -964,7 +1060,7 @@ func (x *TransitionRecord) String() string {
func (*TransitionRecord) ProtoMessage() {}
func (x *TransitionRecord) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[16]
mi := &file_proto_maglev_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -977,7 +1073,7 @@ func (x *TransitionRecord) ProtoReflect() protoreflect.Message {
// Deprecated: Use TransitionRecord.ProtoReflect.Descriptor instead.
func (*TransitionRecord) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{16}
return file_proto_maglev_proto_rawDescGZIP(), []int{18}
}
func (x *TransitionRecord) GetFrom() string {
@@ -1011,7 +1107,7 @@ type BackendEvent struct {
func (x *BackendEvent) Reset() {
*x = BackendEvent{}
mi := &file_proto_maglev_proto_msgTypes[17]
mi := &file_proto_maglev_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1023,7 +1119,7 @@ func (x *BackendEvent) String() string {
func (*BackendEvent) ProtoMessage() {}
func (x *BackendEvent) ProtoReflect() protoreflect.Message {
mi := &file_proto_maglev_proto_msgTypes[17]
mi := &file_proto_maglev_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1036,7 +1132,7 @@ func (x *BackendEvent) ProtoReflect() protoreflect.Message {
// Deprecated: Use BackendEvent.ProtoReflect.Descriptor instead.
func (*BackendEvent) Descriptor() ([]byte, []int) {
return file_proto_maglev_proto_rawDescGZIP(), []int{17}
return file_proto_maglev_proto_rawDescGZIP(), []int{19}
}
func (x *BackendEvent) GetBackendName() string {
@@ -1071,13 +1167,19 @@ const file_proto_maglev_proto_rawDesc = "" +
"\x04name\x18\x01 \x01(\tR\x04name\"\x0e\n" +
"\fWatchRequest\">\n" +
"\x15ListFrontendsResponse\x12%\n" +
"\x0efrontend_names\x18\x01 \x03(\tR\rfrontendNames\"\xb3\x01\n" +
"\x0efrontend_names\x18\x01 \x03(\tR\rfrontendNames\"=\n" +
"\x0fPoolBackendInfo\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" +
"\x06weight\x18\x02 \x01(\x05R\x06weight\"S\n" +
"\bPoolInfo\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x123\n" +
"\bbackends\x18\x02 \x03(\v2\x17.maglev.PoolBackendInfoR\bbackends\"\xb6\x01\n" +
"\fFrontendInfo\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
"\aaddress\x18\x02 \x01(\tR\aaddress\x12\x1a\n" +
"\bprotocol\x18\x03 \x01(\tR\bprotocol\x12\x12\n" +
"\x04port\x18\x04 \x01(\rR\x04port\x12#\n" +
"\rbackend_names\x18\x05 \x03(\tR\fbackendNames\x12 \n" +
"\x04port\x18\x04 \x01(\rR\x04port\x12&\n" +
"\x05pools\x18\x05 \x03(\v2\x10.maglev.PoolInfoR\x05pools\x12 \n" +
"\vdescription\x18\x06 \x01(\tR\vdescription\";\n" +
"\x14ListBackendsResponse\x12#\n" +
"\rbackend_names\x18\x01 \x03(\tR\fbackendNames\"0\n" +
@@ -1113,15 +1215,14 @@ const file_proto_maglev_proto_rawDesc = "" +
" \x01(\x05R\x04rise\x12\x12\n" +
"\x04fall\x18\v \x01(\x05R\x04fall\x12+\n" +
"\x04http\x18\f \x01(\v2\x17.maglev.HTTPCheckParamsR\x04http\x12(\n" +
"\x03tcp\x18\r \x01(\v2\x16.maglev.TCPCheckParamsR\x03tcp\"\xe1\x01\n" +
"\x03tcp\x18\r \x01(\v2\x16.maglev.TCPCheckParamsR\x03tcp\"\xc9\x01\n" +
"\vBackendInfo\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
"\aaddress\x18\x02 \x01(\tR\aaddress\x12\x14\n" +
"\x05state\x18\x03 \x01(\tR\x05state\x12:\n" +
"\vtransitions\x18\x04 \x03(\v2\x18.maglev.TransitionRecordR\vtransitions\x12\x18\n" +
"\aenabled\x18\x05 \x01(\bR\aenabled\x12\x16\n" +
"\x06weight\x18\x06 \x01(\x05R\x06weight\x12 \n" +
"\vhealthcheck\x18\a \x01(\tR\vhealthcheck\"T\n" +
"\aenabled\x18\x05 \x01(\bR\aenabled\x12 \n" +
"\vhealthcheck\x18\x06 \x01(\tR\vhealthcheck\"T\n" +
"\x10TransitionRecord\x12\x12\n" +
"\x04from\x18\x01 \x01(\tR\x04from\x12\x0e\n" +
"\x02to\x18\x02 \x01(\tR\x02to\x12\x1c\n" +
@@ -1156,7 +1257,7 @@ func file_proto_maglev_proto_rawDescGZIP() []byte {
return file_proto_maglev_proto_rawDescData
}
var file_proto_maglev_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_proto_maglev_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_proto_maglev_proto_goTypes = []any{
(*ListFrontendsRequest)(nil), // 0: maglev.ListFrontendsRequest
(*GetFrontendRequest)(nil), // 1: maglev.GetFrontendRequest
@@ -1167,44 +1268,48 @@ var file_proto_maglev_proto_goTypes = []any{
(*GetHealthCheckRequest)(nil), // 6: maglev.GetHealthCheckRequest
(*WatchRequest)(nil), // 7: maglev.WatchRequest
(*ListFrontendsResponse)(nil), // 8: maglev.ListFrontendsResponse
(*FrontendInfo)(nil), // 9: maglev.FrontendInfo
(*ListBackendsResponse)(nil), // 10: maglev.ListBackendsResponse
(*ListHealthChecksResponse)(nil), // 11: maglev.ListHealthChecksResponse
(*HTTPCheckParams)(nil), // 12: maglev.HTTPCheckParams
(*TCPCheckParams)(nil), // 13: maglev.TCPCheckParams
(*HealthCheckInfo)(nil), // 14: maglev.HealthCheckInfo
(*BackendInfo)(nil), // 15: maglev.BackendInfo
(*TransitionRecord)(nil), // 16: maglev.TransitionRecord
(*BackendEvent)(nil), // 17: maglev.BackendEvent
(*PoolBackendInfo)(nil), // 9: maglev.PoolBackendInfo
(*PoolInfo)(nil), // 10: maglev.PoolInfo
(*FrontendInfo)(nil), // 11: maglev.FrontendInfo
(*ListBackendsResponse)(nil), // 12: maglev.ListBackendsResponse
(*ListHealthChecksResponse)(nil), // 13: maglev.ListHealthChecksResponse
(*HTTPCheckParams)(nil), // 14: maglev.HTTPCheckParams
(*TCPCheckParams)(nil), // 15: maglev.TCPCheckParams
(*HealthCheckInfo)(nil), // 16: maglev.HealthCheckInfo
(*BackendInfo)(nil), // 17: maglev.BackendInfo
(*TransitionRecord)(nil), // 18: maglev.TransitionRecord
(*BackendEvent)(nil), // 19: maglev.BackendEvent
}
var file_proto_maglev_proto_depIdxs = []int32{
12, // 0: maglev.HealthCheckInfo.http:type_name -> maglev.HTTPCheckParams
13, // 1: maglev.HealthCheckInfo.tcp:type_name -> maglev.TCPCheckParams
16, // 2: maglev.BackendInfo.transitions:type_name -> maglev.TransitionRecord
16, // 3: maglev.BackendEvent.transition:type_name -> maglev.TransitionRecord
0, // 4: maglev.Maglev.ListFrontends:input_type -> maglev.ListFrontendsRequest
1, // 5: maglev.Maglev.GetFrontend:input_type -> maglev.GetFrontendRequest
2, // 6: maglev.Maglev.ListBackends:input_type -> maglev.ListBackendsRequest
3, // 7: maglev.Maglev.GetBackend:input_type -> maglev.GetBackendRequest
4, // 8: maglev.Maglev.PauseBackend:input_type -> maglev.PauseResumeRequest
4, // 9: maglev.Maglev.ResumeBackend:input_type -> maglev.PauseResumeRequest
5, // 10: maglev.Maglev.ListHealthChecks:input_type -> maglev.ListHealthChecksRequest
6, // 11: maglev.Maglev.GetHealthCheck:input_type -> maglev.GetHealthCheckRequest
7, // 12: maglev.Maglev.WatchBackendEvents:input_type -> maglev.WatchRequest
8, // 13: maglev.Maglev.ListFrontends:output_type -> maglev.ListFrontendsResponse
9, // 14: maglev.Maglev.GetFrontend:output_type -> maglev.FrontendInfo
10, // 15: maglev.Maglev.ListBackends:output_type -> maglev.ListBackendsResponse
15, // 16: maglev.Maglev.GetBackend:output_type -> maglev.BackendInfo
15, // 17: maglev.Maglev.PauseBackend:output_type -> maglev.BackendInfo
15, // 18: maglev.Maglev.ResumeBackend:output_type -> maglev.BackendInfo
11, // 19: maglev.Maglev.ListHealthChecks:output_type -> maglev.ListHealthChecksResponse
14, // 20: maglev.Maglev.GetHealthCheck:output_type -> maglev.HealthCheckInfo
17, // 21: maglev.Maglev.WatchBackendEvents:output_type -> maglev.BackendEvent
13, // [13:22] is the sub-list for method output_type
4, // [4:13] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
9, // 0: maglev.PoolInfo.backends:type_name -> maglev.PoolBackendInfo
10, // 1: maglev.FrontendInfo.pools:type_name -> maglev.PoolInfo
14, // 2: maglev.HealthCheckInfo.http:type_name -> maglev.HTTPCheckParams
15, // 3: maglev.HealthCheckInfo.tcp:type_name -> maglev.TCPCheckParams
18, // 4: maglev.BackendInfo.transitions:type_name -> maglev.TransitionRecord
18, // 5: maglev.BackendEvent.transition:type_name -> maglev.TransitionRecord
0, // 6: maglev.Maglev.ListFrontends:input_type -> maglev.ListFrontendsRequest
1, // 7: maglev.Maglev.GetFrontend:input_type -> maglev.GetFrontendRequest
2, // 8: maglev.Maglev.ListBackends:input_type -> maglev.ListBackendsRequest
3, // 9: maglev.Maglev.GetBackend:input_type -> maglev.GetBackendRequest
4, // 10: maglev.Maglev.PauseBackend:input_type -> maglev.PauseResumeRequest
4, // 11: maglev.Maglev.ResumeBackend:input_type -> maglev.PauseResumeRequest
5, // 12: maglev.Maglev.ListHealthChecks:input_type -> maglev.ListHealthChecksRequest
6, // 13: maglev.Maglev.GetHealthCheck:input_type -> maglev.GetHealthCheckRequest
7, // 14: maglev.Maglev.WatchBackendEvents:input_type -> maglev.WatchRequest
8, // 15: maglev.Maglev.ListFrontends:output_type -> maglev.ListFrontendsResponse
11, // 16: maglev.Maglev.GetFrontend:output_type -> maglev.FrontendInfo
12, // 17: maglev.Maglev.ListBackends:output_type -> maglev.ListBackendsResponse
17, // 18: maglev.Maglev.GetBackend:output_type -> maglev.BackendInfo
17, // 19: maglev.Maglev.PauseBackend:output_type -> maglev.BackendInfo
17, // 20: maglev.Maglev.ResumeBackend:output_type -> maglev.BackendInfo
13, // 21: maglev.Maglev.ListHealthChecks:output_type -> maglev.ListHealthChecksResponse
16, // 22: maglev.Maglev.GetHealthCheck:output_type -> maglev.HealthCheckInfo
19, // 23: maglev.Maglev.WatchBackendEvents:output_type -> maglev.BackendEvent
15, // [15:24] is the sub-list for method output_type
6, // [6:15] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_proto_maglev_proto_init() }
@@ -1218,7 +1323,7 @@ func file_proto_maglev_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_maglev_proto_rawDesc), len(file_proto_maglev_proto_rawDesc)),
NumEnums: 0,
NumMessages: 18,
NumMessages: 20,
NumExtensions: 0,
NumServices: 1,
},