Revision: Rename to 'maglevd'; Refactor config structure

This commit is contained in:
2026-04-10 22:15:20 +02:00
parent b84b3274b1
commit 040d6f5853
16 changed files with 2852 additions and 1942 deletions

View File

@@ -90,9 +90,9 @@ func (h *HealthCounter) RecordFail() bool {
return !wasDown && !h.IsUp()
}
// Backend tracks the health state of one VIP:backend tuple.
// Backend tracks the health state of a named backend.
type Backend struct {
VIPName string
Name string
Address net.IP
State State
Counter HealthCounter
@@ -100,9 +100,9 @@ type Backend struct {
}
// New creates a Backend in StateUnknown.
func New(vipName string, addr net.IP, rise, fall int) *Backend {
func New(name string, addr net.IP, rise, fall int) *Backend {
return &Backend{
VIPName: vipName,
Name: name,
Address: addr,
State: StateUnknown,
Counter: HealthCounter{Rise: rise, Fall: fall},