Documentation
¶
Index ¶
- Constants
- type HAWatcher
- type HighAvailabilityManager
- func (s *HighAvailabilityManager) BumpActiveExpire(ctx context.Context) error
- func (s *HighAvailabilityManager) CheckActive(ctx context.Context) (bool, error)
- func (s *HighAvailabilityManager) CheckActiveLoop(ctx context.Context)
- func (s *HighAvailabilityManager) DumpHAManager(ctx context.Context, req *edgeproto.DebugRequest) string
- func (s *HighAvailabilityManager) GetValue(ctx context.Context, key string) (string, error)
- func (s *HighAvailabilityManager) Init(ctx context.Context, nodeGroupKey string, nodeMgr *node.NodeMgr, ...) error
- func (s *HighAvailabilityManager) InitFlags()
- func (s *HighAvailabilityManager) IsActive() bool
- func (s *HighAvailabilityManager) SetValue(ctx context.Context, key string, value string, expiration time.Duration) error
Constants ¶
View Source
const CheckActiveLogInterval = time.Second * 10
View Source
const HighAvailabilityManagerDisabled = "HighAvailabilityManagerDisabled"
View Source
const MaxRedisUnreachableRetries = 3
View Source
const RedisPingFail string = "Redis Ping Fail"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HAWatcher ¶
type HAWatcher interface {
ActiveChangedPreSwitch(ctx context.Context, haRole string, platformActive bool) error // actions before setting PlatformInstanceActive
ActiveChangedPostSwitch(ctx context.Context, haRole string, platformActive bool) error // actions after setting PlatformInstanceActive
PlatformActiveOnStartup(ctx context.Context) // actions if the platform is active on first
DumpWatcherFields(ctx context.Context) map[string]interface{}
}
type HighAvailabilityManager ¶
type HighAvailabilityManager struct {
HARole string
HAEnabled bool
PlatformInstanceActive bool
ActiveTransitionInProgress bool // active from a redis standpoint but still doing switchover actions
RedisConnectionFailed bool // used when primary becomes active due to redis unavailability
// contains filtered or unexported fields
}
func (*HighAvailabilityManager) BumpActiveExpire ¶
func (s *HighAvailabilityManager) BumpActiveExpire(ctx context.Context) error
func (*HighAvailabilityManager) CheckActive ¶
func (s *HighAvailabilityManager) CheckActive(ctx context.Context) (bool, error)
func (*HighAvailabilityManager) CheckActiveLoop ¶
func (s *HighAvailabilityManager) CheckActiveLoop(ctx context.Context)
func (*HighAvailabilityManager) DumpHAManager ¶
func (s *HighAvailabilityManager) DumpHAManager(ctx context.Context, req *edgeproto.DebugRequest) string
func (*HighAvailabilityManager) InitFlags ¶
func (s *HighAvailabilityManager) InitFlags()
func (*HighAvailabilityManager) IsActive ¶
func (s *HighAvailabilityManager) IsActive() bool
Click to show internal directories.
Click to hide internal directories.