redis

package
v0.0.0-...-0f32b90 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPrefix = "status-"
)

Variables

This section is empty.

Functions

func LoadStatus

func LoadStatus(conn redis.Conn, redisKey string) []pingd.HostStatus

func NewLoaderFunc

func NewLoaderFunc(redisAddr string, redisDB int, listKey string) pingd.Loader

NewLoaderFunc returns the function that loads back hosts and last statuses from REDIS in case of reboot send them to the startHostCh channel

func NewNotifierFunc

func NewNotifierFunc(redisAddr string, redisDB int, upKey, downKey string) pingd.Notifier

NewNotifierFunc returns the function that publishes on redis the up/down events

func NewReceiverFunc

func NewReceiverFunc(redisAddr string, redisDB int, startKey, stopKey, listKey string) pingd.Receiver

NewReceiverFunc returns the function that listens of redis for start/stop commands

func NewRedisConn

func NewRedisConn(redisAddr string, redisDB int, purpose string) redis.Conn

func StartRedisHost

func StartRedisHost(connKV redis.Conn, listKey, host string, startHostCh chan<- pingd.HostStatus)

func StopRedisHost

func StopRedisHost(connKV redis.Conn, listKey, host string, stopHostCh chan<- pingd.HostStatus)

Types

This section is empty.

Jump to

Keyboard shortcuts

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