redis

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

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notify

type Notify func(k, v string)

type Observer

type Observer struct {
	// contains filtered or unexported fields
}

func NewObserver

func NewObserver(addr, pass string) (*Observer, error)

func (*Observer) Subscribe

func (o *Observer) Subscribe(db int, pattern string, interval time.Duration, notify Notify) map[string]string

Подписывается на изменение строкового ключа в редисе db: номер базы редиса pattern: ключ в редисе interval: интервал проверок значения notify: функция обратного вызова при изменении ключа

func (*Observer) Unsubscribe

func (o *Observer) Unsubscribe(db int, pattern string)

Jump to

Keyboard shortcuts

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