pubsub

package
v0.0.0-...-ef3d5ad Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient() *redis.Client

Types

type Notifier

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

func NewNotifier

func NewNotifier(client *redis.Client) *Notifier

func (*Notifier) PublishMessage

func (s *Notifier) PublishMessage(c context.Context, channel, message string) error

type Observer

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

func NewObserver

func NewObserver(client *redis.Client, channel string, queueSize int) *Observer

func (*Observer) ProcessMessages

func (o *Observer) ProcessMessages(handler func(msg string))

func (*Observer) Subscribe

func (o *Observer) Subscribe(c context.Context)

Jump to

Keyboard shortcuts

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