server

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(dependencies Dependencies) http.Handler

func NewOperatorHandler added in v0.6.0

func NewOperatorHandler(service *app.OperatorService, ready func() bool) http.Handler

NewOperatorHandler serves exactly the generated read contract. Register it only when enabled, behind WithOperatorAuth, on the existing host mux.

func NewWebHandler added in v0.6.0

func NewWebHandler(service *app.OperatorService, dependencies Dependencies, token string) (http.Handler, error)

NewWebHandler mounts no routes itself. Composition mounts its public shell and protected fragments on the same host listener only when web is enabled.

func WithOperatorAuth

func WithOperatorAuth(next http.Handler, token string) http.Handler

WithOperatorAuth protects public business endpoints when token is configured. Health probes remain public, and trusted in-process workflows bypass HTTP auth.

func WithOperatorReadBoundary added in v0.6.0

func WithOperatorReadBoundary(next http.Handler, ready func() bool) http.Handler

WithOperatorReadBoundary is shared by JSON and future authenticated fragments. Scope belongs exclusively to the composed service. It rejects every supplied override (including blank values), any GET body, and unavailable lifecycle state before application dispatch. It does not perform authentication.

Types

type Dependencies

type Dependencies struct {
	EmbeddingsEnabled bool
	Scope             domain.ScopeRef
	Ingest            *app.IngestService
	Query             *app.QueryService
	Ready             func() bool
	Waker             Waker
}

type Waker

type Waker interface {
	Wake(id domain.OperationID)
}

Jump to

Keyboard shortcuts

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