ws

package
v0.0.0-...-c63e43b Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Upgrader = websocket.Upgrader{
	ReadBufferSize:  1024,
	WriteBufferSize: 1024,
}

Functions

This section is empty.

Types

type Funnel

type Funnel struct {
	Key    string
	WSConn *websocket.Conn
	PubSub *redis.PubSub
}

type Funnels

type Funnels struct {
	Clients        map[string]*Funnel
	StoreOnFailure bool
	sync.RWMutex
}

func (*Funnels) Add

func (funnels *Funnels) Add(red *redis.Client, funnel *Funnel)

func (*Funnels) Remove

func (funnels *Funnels) Remove(funnel *Funnel) error

func (*Funnels) Send

func (funnels *Funnels) Send(red *redis.Client, key string, msg interface{}) error

func (*Funnels) SendBytes

func (funnels *Funnels) SendBytes(red *redis.Client, key string, msg []byte) error

Jump to

Keyboard shortcuts

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