ssc

package
v2.0.0-...-30997d8 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Broadcast

func Broadcast(component string, payload any, opts ...host.BroadcastOption)

func EmitSSC

func EmitSSC(ctx context.Context, event SSCEvent) error

func SubscribeSSC

func SubscribeSSC(fn fnevents.Handler[SSCEvent], priority ...fnevents.Priority)

func WithSessionTarget

func WithSessionTarget(sessionID string) host.BroadcastOption

Types

type BroadcastOption

type BroadcastOption = host.BroadcastOption

type SSCEvent

type SSCEvent struct {
	Component string
	Payload   map[string]any
	Session   *host.Session
}

type SSCServer

type SSCServer struct {
	Addr string
	Root string
	Mux  *http.ServeMux
}

func NewSSCServer

func NewSSCServer(addr, root string) *SSCServer

func (*SSCServer) ListenAndServe

func (s *SSCServer) ListenAndServe() error

Jump to

Keyboard shortcuts

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