ws

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 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 {
	Done chan struct{}
	// contains filtered or unexported fields
}

Client represents a connected websocket client

type Hub

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

Hub maintains the set of active clients and broadcasts messages to them

func NewHub

func NewHub() *Hub

NewHub creates a new hub

func (*Hub) BroadcastAll

func (h *Hub) BroadcastAll(message []byte)

BroadcastAll sends a message to all connected clients

func (*Hub) BroadcastToWorkflow

func (h *Hub) BroadcastToWorkflow(workflowID string, message []byte)

func (*Hub) NewClient

func (h *Hub) NewClient(conn *websocket.Conn, workflowID string) *Client

NewClient creates a new websocket client

func (*Hub) Run

func (h *Hub) Run()

Run starts the hub processing loop

Jump to

Keyboard shortcuts

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