talk

package
v0.0.0-...-246a25b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONErr

func JSONErr(w http.ResponseWriter, error string, code int)

func JSONRes

func JSONRes(w http.ResponseWriter, a any, code int)

Types

type Client

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

func NewClient

func NewClient(hub *Hub, conn *websocket.Conn, user string) *Client

func (*Client) ReadPump

func (c *Client) ReadPump()

func (*Client) WritePump

func (c *Client) WritePump()

type Hub

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

func NewHub

func NewHub() *Hub

func (*Hub) Run

func (h *Hub) Run(ctx context.Context) error

func (*Hub) ServeWS

func (h *Hub) ServeWS(w http.ResponseWriter, r *http.Request)

type Message

type Message struct {
	TransactionID string `json:"tid"`
	DestinationID string `json:"dst"`
	SourceID      string `json:"src"`
	Status        uint32 `json:"status"`
	Value         string `json:"val"`
}

Jump to

Keyboard shortcuts

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