Documentation
¶
Index ¶
- func NewHandler(dependencies Dependencies) http.Handler
- func NewOperatorHandler(service *app.OperatorService, ready func() bool) http.Handler
- func NewWebHandler(service *app.OperatorService, dependencies Dependencies, token string) (http.Handler, error)
- func WithOperatorAuth(next http.Handler, token string) http.Handler
- func WithOperatorReadBoundary(next http.Handler, ready func() bool) http.Handler
- type Dependencies
- type Waker
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 ¶
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
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)
}