ws

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAuthValidator

func WithAuthValidator(next http.Handler, validator tokenValidator) http.Handler

Types

type Client

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

func (*Client) Send

func (c *Client) Send(msg []byte) bool

type Hub

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

func NewHub

func NewHub(broadcasts message.BroadcastRepository, devices device.Repository, channels channel.Repository) *Hub

func (*Hub) ClientCount

func (h *Hub) ClientCount() int64

func (*Hub) HandleWS

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

func (*Hub) IsOnline

func (h *Hub) IsOnline(userID user.ID) bool

func (*Hub) NotifyChannelDeleted

func (h *Hub) NotifyChannelDeleted(id channel.ID)

func (*Hub) NotifyChannelUpdated

func (h *Hub) NotifyChannelUpdated(ch channel.Channel)

func (*Hub) NotifyUserProfileUpdated

func (h *Hub) NotifyUserProfileUpdated(id user.ID)

func (*Hub) Run

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

Jump to

Keyboard shortcuts

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