Revision: Rename to 'maglevd'; Refactor config structure
This commit is contained in:
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user