stream

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Session sockjs.Session
	//User *rbac.User
	Ip        string
	Referer   string
	UserAgent string
	Width     int
	Height    int
	Cookie    bool
	Language  string
	Platform  string
	Location  string
	Href      string
}

func (*Client) Notify

func (c *Client) Notify(t, b string)

func (*Client) Send

func (c *Client) Send(msg string)

func (*Client) UpdateInfo

func (c *Client) UpdateInfo(info interface{})

type Hub

type Hub interface {
	Broadcast(message string)
	Subscribe(command string, f func(client *Client, value interface{}))
	UnSubscribe(command string)
	AddClient(client *Client)
}

func GetHub

func GetHub() Hub

type StreamCotroller

type StreamCotroller struct {
	beego.Controller
}

func (*StreamCotroller) Get

func (w *StreamCotroller) Get()

Jump to

Keyboard shortcuts

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