pubsub

package
v0.0.0-...-f6037d1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPubsubIsNotExist = errors.New("redis pubsub key is not exist")
)

Functions

This section is empty.

Types

type RedisPubsub

type RedisPubsub interface {
	Subscribe(key string, callback func(string, error), autoReconnect bool)
	Unsubscribe(key string) error
}

func NewRedisPubsub

func NewRedisPubsub(redisClient rclib.RedisClient) RedisPubsub

type RedisPubsubImpl

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

func (*RedisPubsubImpl) Subscribe

func (rp *RedisPubsubImpl) Subscribe(key string, callback func(string, error), autoReconnect bool)

func (*RedisPubsubImpl) Unsubscribe

func (rp *RedisPubsubImpl) Unsubscribe(key string) error

type Subscriber

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

func (*Subscriber) StartSubscribe

func (s *Subscriber) StartSubscribe()

Jump to

Keyboard shortcuts

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