MCPcopy Index your code
hub / github.com/google/seesaw / haConfig

Method haConfig

engine/core.go:203–216  ·  view source on GitHub ↗

haConfig returns the HAConfig for an engine.

()

Source from the content-addressed store, hash-verified

201
202// haConfig returns the HAConfig for an engine.
203func (e *Engine) haConfig() (*seesaw.HAConfig, error) {
204 n, err := e.thisNode()
205 if err != nil {
206 return nil, err
207 }
208 // TODO(jsing): This does not allow for IPv6-only operation.
209 return &seesaw.HAConfig{
210 Enabled: n.State != spb.HaState_DISABLED,
211 LocalAddr: e.config.Node.IPv4Addr,
212 RemoteAddr: e.config.VRRPDestIP,
213 Priority: n.Priority,
214 VRID: e.config.VRID,
215 }, nil
216}
217
218// thisNode returns the Node for the machine on which this engine is running.
219func (e *Engine) thisNode() (*seesaw.Node, error) {

Callers 2

managerMethod · 0.95
HAConfigMethod · 0.80

Implementers 3

EngineClientha/engine_client.go
DummyEngineha/engine_client.go
SeesawEngineengine/ipc.go

Calls 1

thisNodeMethod · 0.95

Tested by

no test coverage detected