pubsub

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSub

type PubSub interface {
	Subscribe(channel string, handler PubSubHandler, onStart func() error) error
	Publish(channel string, message []byte) error
	Close() error
	Check() error
}

func NewPubSub

func NewPubSub(cfg config.PubSub) PubSub

type PubSubHandler

type PubSubHandler func(ctx context.Context, message []byte)

type Redis

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

func NewRedis

func NewRedis(cfg config.Redis) *Redis

func (*Redis) Check added in v0.10.0

func (r *Redis) Check() error

func (*Redis) Close

func (r *Redis) Close() error

func (*Redis) Publish

func (r *Redis) Publish(channel string, message []byte) error

func (*Redis) Subscribe

func (r *Redis) Subscribe(channel string, handler PubSubHandler, onStart func() error) error

func (*Redis) Unsubscribe

func (r *Redis) Unsubscribe()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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