watchmux

package
v0.23.1 Latest Latest
Warning

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

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

Documentation

Overview

Package watchmux serves multiple Kubernetes watch streams over one browser WebSocket connection.

Index

Constants

View Source
const (
	// Path is the browser WebSocket endpoint. It is a non-resource path so the
	// outer authorization layer can admit the handshake before each logical
	// resource watch is authorized.
	Path = "/console/watch"
	// Protocol is the negotiated WebSocket subprotocol.
	Protocol = "apoxy.watch.v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Delegate            http.Handler
	RequestInfoResolver apirequest.RequestInfoResolver
	Authorizer          authorizer.Authorizer
}

Config supplies the API server components needed to dispatch and authorize logical watch requests.

type Handler

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

Handler multiplexes watch requests over one WebSocket.

func New

func New(cfg Config) (*Handler, error)

New returns a watch multiplexer handler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP upgrades one browser connection and manages its logical watches.

Jump to

Keyboard shortcuts

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