hub

package
v0.0.0-...-84a3d47 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MessageTypeChat string = "message_new"
	MessageText     string = "message_text"

	CommandNewChannel    string = "message_new_channel"
	CommandNewChannelACK string = "message_new_channel_ACK"
)

Variables

This section is empty.

Functions

func GetMux

func GetMux(h *Hub, authFunc func(string) (jwt.MapClaims, error)) *http.ServeMux

GetMux returns router for the API

Types

type Client

type Client struct {
	ID  string
	Hub *Hub
	// contains filtered or unexported fields
}

Client is a middleman between the websocket connection and the hub.

type Hub

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

func NewHub

func NewHub() *Hub

NewHub used to create a new hub instance

func (*Hub) Run

func (h *Hub) Run()

Run starts the hub listening on its channels

Jump to

Keyboard shortcuts

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