broker

package
v0.0.0-...-623b4cd Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	Publish(msg []byte)
	Subscribe() (chan []byte, error)
	Unsubscribe(ch chan []byte)
}

type RedisBroker

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

func NewRedisBroker

func NewRedisBroker(uuid util.UUID) *RedisBroker

func (*RedisBroker) Publish

func (b *RedisBroker) Publish(msg []byte)

func (*RedisBroker) Subscribe

func (b *RedisBroker) Subscribe() (ch chan []byte, err error)

func (*RedisBroker) Unsubscribe

func (b *RedisBroker) Unsubscribe(ch chan []byte)

func (*RedisBroker) UnsubscribeAll

func (b *RedisBroker) UnsubscribeAll()

type RedisRegistrar

type RedisRegistrar struct{}

func NewRedisRegistrar

func NewRedisRegistrar() *RedisRegistrar

func (*RedisRegistrar) IsRegistered

func (rr *RedisRegistrar) IsRegistered(channel util.UUID) (registered bool)

func (*RedisRegistrar) Register

func (rr *RedisRegistrar) Register(channel util.UUID) (err error)

type Registrar

type Registrar interface {
	Register(id util.UUID) error
	IsRegistered(id util.UUID) bool
}

Jump to

Keyboard shortcuts

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