pubsub

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Pubsub

type Pubsub struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Pubsub) Publish

func (this *Pubsub) Publish(context app.Context, topic string, message app.PubsubMessage)

func (*Pubsub) Subscribe

func (this *Pubsub) Subscribe(context app.Context, topic string, handler app.TopicHandler)

type TopicHandlerList

type TopicHandlerList struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTopicHandlerList

func NewTopicHandlerList(handlers ...app.TopicHandler) *TopicHandlerList

func (*TopicHandlerList) Add

func (this *TopicHandlerList) Add(handler app.TopicHandler)

func (*TopicHandlerList) Dispatch

func (this *TopicHandlerList) Dispatch(message app.PubsubMessage)

Jump to

Keyboard shortcuts

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