handlers

package
v0.7.446-dev Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthHandler

func HealthHandler() http.HandlerFunc

func NewStaticHandler

func NewStaticHandler() (http.Handler, error)

func ReadyHandler

func ReadyHandler() http.HandlerFunc

Types

type Authenticator

type Authenticator interface {
	AuthLogin(message event.LoginEvent, psk security.PSK) (event.LoginResponse, error)
	AuthLogout()
	Reset()
	PrivateKey() ed25519.PrivateKey
}

Authenticator is the slice of the auth service the dispatcher uses: log the owner in and out, and sign self-stream requests with their key.

type BridgeHandler

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

func NewBridgeHandler

func NewBridgeHandler(
	codec Codec,
	auth Authenticator,
	psk security.PSK,
	firstRun func() bool,
) *BridgeHandler

func (*BridgeHandler) AttachNode

func (b *BridgeHandler) AttachNode(n Node)

func (*BridgeHandler) Handle

func (b *BridgeHandler) Handle() http.HandlerFunc

type Codec

type Codec interface {
	Decode(frame []byte) (plain []byte, encrypted bool)
	Encode(reply []byte, encrypted bool) ([]byte, error)
}

type Node

type Node interface {
	SelfStream(path stream.WarpRoute, data any) ([]byte, error)
}

Jump to

Keyboard shortcuts

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