pubsub

package
v0.0.0-...-4a0a415 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUBSCRIBE operation = iota
	UNSUBSCRIBE
	PUBLISH
	SHUTDOWN
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSub

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

func New

func New(capacity int) *PubSub

func (*PubSub) Publish

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

func (*PubSub) Shutdown

func (ps *PubSub) Shutdown()

func (*PubSub) Subscribe

func (ps *PubSub) Subscribe(topic string, options interface{}, callback func(interface{}) error) (subscription.Subscription, error)

func (*PubSub) Unsubscribe

func (ps *PubSub) Unsubscribe(sub subscription.Subscription) error

type Subscription

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

Jump to

Keyboard shortcuts

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