Documentation ¶
Overview ¶
Checker implementations for a cluster connector
localchecker - Check status of clustered redis instances. It checks responses of the redis 'PING' command. If a instance suffers status flapping, exponential backoff penalty would be applied. (However, the penalty would not be more than 10 times of dead detection threshold)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthChecker ¶
type HealthChecker interface { Start([]Shard) <-chan ShardStatus Stop() }
An interface for a health checker to manage cluster status
type LocalChecker ¶
type LocalChecker struct { Nworker int Interval time.Duration Threshold time.Duration // contains filtered or unexported fields }
A simple checker implementation for clustered redis instances
func (*LocalChecker) Start ¶
func (c *LocalChecker) Start(shards []Shard) <-chan ShardStatus
Start the checker. If it is already running, do nothing.
func (*LocalChecker) Stop ¶
func (c *LocalChecker) Stop()
Stop the checker. If it is already stopped, do nothing.
type ShardStatus ¶
Click to show internal directories.
Click to hide internal directories.