domain

package
v0.0.0-...-1cb9ecb Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubscriber

func NewSubscriber() chan interface{}

Types

type Broker

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

func NewBroker

func NewBroker() *Broker

func (*Broker) AddSubscriber

func (b *Broker) AddSubscriber(topic string, ch Subscriber)

func (*Broker) Publish

func (b *Broker) Publish(ctx context.Context, topic string, message []byte)

func (*Broker) Subscribe

func (b *Broker) Subscribe(ctx context.Context, topic string, function func(interface{}))

type Subscriber

type Subscriber chan interface{}

Jump to

Keyboard shortcuts

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