pubsub

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSub

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

func Initialize

func Initialize(capacity int) *PubSub

func (*PubSub) Publish

func (ps *PubSub) Publish(topic string, message interface{})

* Note This will block the producer if any consumer hits the capacity depth

func (*PubSub) Subscribe

func (ps *PubSub) Subscribe(topic string) chan interface{}

* This is not thread safe, so set up all the subscribers in the main thread

Jump to

Keyboard shortcuts

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