channel

package
v0.0.0-...-2b46a3a Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

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

Hub is responsible for piping messages to all registered channels

func (*Hub) DeregisterChannel

func (ch *Hub) DeregisterChannel(channel *chan string)

DeregisterChannel removes the channel from the list of channels to write to

func (*Hub) RegisterChannel

func (ch *Hub) RegisterChannel(channel *chan string, topics []string) (err error)

RegisterChannel registers the specified channel with the specified topics

func (*Hub) SendMessage

func (ch *Hub) SendMessage(message string, topic string)

SendMessage publishes a message to all matching channels registered to the topic

Jump to

Keyboard shortcuts

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