broker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish(topic string, msg interface{})

func Subscribe

func Subscribe(topic string, handler Handler)

Types

type Broker

type Broker interface {
	Publish(topic string, msg interface{})
	Subscribe(topic string, handler Handler)
}
var (
	Default Broker
)

func NewLocalBroker

func NewLocalBroker() Broker

type Handler

type Handler func(Publication)

type Publication

type Publication interface {
	Topic() string
	Message() interface{}
}

Jump to

Keyboard shortcuts

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