observer

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier[event any] interface {
	Register(o Observer[event])
	Unregister(o Observer[event])
	Notify(e event)
}

func NewUserNotifier

func NewUserNotifier[event any](channel string) Notifier[event]

type Observer

type Observer[event any] interface {
	OnNotify(handler func(msg string))
}

func NewUserObserver

func NewUserObserver[event any](client *redis.Client, channel string) Observer[event]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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