ws

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeWs

func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request)

Types

type Client

type Client struct {
	ClientID string
	// contains filtered or unexported fields
}

func (*Client) GetReplyQueueName

func (c *Client) GetReplyQueueName() string

func (*Client) RemoveMeCleanly

func (c *Client) RemoveMeCleanly()

func (*Client) Send

func (c *Client) Send(b []byte)

type Hub

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

func NewHub

func NewHub(publisher func(body []byte), replier func(client *Client) func()) *Hub

func (*Hub) Run

func (h *Hub) Run()

type WrappedMessage

type WrappedMessage struct {
	ClientID string          `json:"clientID"`
	Body     json.RawMessage `json:"body"`
}

Jump to

Keyboard shortcuts

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