observer

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubscriber

func NewSubscriber() *memSubscriber

Types

type Observer

type Observer interface {
	Subscribe(channel string) Subscriber
	Publish(channel string, msg interface{}) error
	Unsubscribe(channel string, subscriber Subscriber) error
	PubNumSub(channel string) map[string]int
}

func NewObserver

func NewObserver(log *logger.Logger) Observer

type Subscriber

type Subscriber interface {
	Channel() <-chan interface{}
	Close() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳