MCPcopy
hub / github.com/google/seesaw / config

Function config

binaries/seesaw_ha/main.go:81–96  ·  view source on GitHub ↗

config reads the HAConfig from the engine. It does not return until it successfully retrieves an HAConfig that has HA peering enabled.

(e ha.Engine)

Source from the content-addressed store, hash-verified

79// config reads the HAConfig from the engine. It does not return until it
80// successfully retrieves an HAConfig that has HA peering enabled.
81func config(e ha.Engine) *seesaw.HAConfig {
82 for {
83 c, err := e.HAConfig()
84 switch {
85 case err != nil:
86 log.Errorf("config: Failed to retrieve HAConfig: %v", err)
87
88 case !c.Enabled:
89 log.Infof("config: HA peering is currently disabled for this node")
90
91 default:
92 return c
93 }
94 time.Sleep(*initConfigRetryDelay)
95 }
96}
97
98func engine() ha.Engine {
99 if *testMode {

Callers 1

mainFunction · 0.85

Calls 1

HAConfigMethod · 0.65

Tested by

no test coverage detected