pubsub

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discard

func Discard() *discarder

Types

type Client

type Client interface {
	Publisher
	Subscriber
}

type Memory

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

func New

func New() *Memory

func (*Memory) Publish

func (m *Memory) Publish(topic string, data []byte)

func (*Memory) Subscribe

func (m *Memory) Subscribe(topics ...string) Subscription

type Publisher

type Publisher interface {
	Publish(topic string, data []byte)
}

type Subscriber

type Subscriber interface {
	Subscribe(topics ...string) Subscription
}

type Subscription

type Subscription interface {
	Wait() <-chan []byte
	Close()
}

Jump to

Keyboard shortcuts

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