flows

package module
v0.0.0-...-48bb52a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 5 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 {
	// contains filtered or unexported fields
}

func NewHub

func NewHub(c redis.Conn) *Hub

func (*Hub) Deliver

func (h *Hub) Deliver()

func (*Hub) Subscribe

func (h *Hub) Subscribe(id string, topics []string) (*Subscription, error)

type Publisher

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

func NewPublisher

func NewPublisher(c redis.Conn) *Publisher

func (*Publisher) Publish

func (p *Publisher) Publish(topic string, payload []byte) error

func (*Publisher) PublishJSON

func (p *Publisher) PublishJSON(topic string, object interface{}) error

type Response

type Response struct {
	Topic   string
	Content []byte
}

func (Response) TryJSON

func (r Response) TryJSON(v interface{}) bool

type Subscription

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

func (*Subscription) Channel

func (s *Subscription) Channel() chan Response

func (*Subscription) Unsubscribe

func (s *Subscription) Unsubscribe() error

Jump to

Keyboard shortcuts

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