checker

package
v0.0.0-...-a11d02e Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2015 License: MIT Imports: 6 Imported by: 0

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

type ShardStatus struct {
	Addr  string
	Alive bool
	Since int64
}

Jump to

Keyboard shortcuts

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