redundancy

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 (*HighAvailabilityManager) GetValue

func (s *HighAvailabilityManager) GetValue(ctx context.Context, key string) (string, error)

func (*HighAvailabilityManager) Init

func (s *HighAvailabilityManager) Init(ctx context.Context, nodeGroupKey string, nodeMgr *node.NodeMgr, activeDuration, activePollInterval edgeproto.Duration, haWatcher HAWatcher) error

func (*HighAvailabilityManager) InitFlags

func (s *HighAvailabilityManager) InitFlags()

func (*HighAvailabilityManager) IsActive

func (s *HighAvailabilityManager) IsActive() bool

func (*HighAvailabilityManager) SetValue

func (s *HighAvailabilityManager) SetValue(ctx context.Context, key string, value string, expiration time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL