workerws

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package workerws exposes the private WebSocket transport used by human TUI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ReadLimit    int64
	WriteTimeout time.Duration
	PingInterval time.Duration
	PingTimeout  time.Duration
}

type Server

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

func New

func New(
	config Config,
	authenticator auth.Authenticator,
	workerHub *hub.Hub,
	receiptStores ...storeapi.WorkerEventReceiptStore,
) (*Server, error)

func (*Server) Close

func (server *Server) Close()

Close prevents new worker handshakes, terminates every active WebSocket, and waits until its handler has released the hub session and stopped touching the receipt store. net/http Server.Shutdown does not close hijacked WebSockets, so the embedding gateway must include this transport-specific drain before it closes SQLite.

func (*Server) ServeHTTP

func (server *Server) ServeHTTP(response http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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