Documentation
¶
Overview ¶
Package server is fort-core's local HTTP/WS API (backlog AO-011): /health, graceful shutdown, and the event/command surface the fort-ui module consumes (the live-feed and command routes are added in Phase 3 on top of this).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObserveRequests ¶ added in v0.13.0
func ObserveRequests(next http.Handler, observer RequestObserver) http.Handler
ObserveRequests adds one canonical correlation ID and emits a payload-free completion event. It is shared by the local listener and the relay mux.
Types ¶
type Deps ¶
type Deps struct {
Config config.Config
Engine *engine.Engine
Store *store.Store
Logger *slog.Logger
RequestObserver RequestObserver
// Mount optionally adds extra routes (the fort-ui module, wired in by
// cmd/fort). core never imports ui — the closure is provided from outside,
// preserving the core !-> ui seam.
Mount func(*http.ServeMux)
}
Deps are the server's collaborators. All are optional for the bare /health server; richer routes require engine + store.
type RequestEvent ¶ added in v0.13.0
RequestEvent is the payload-free ingress trace emitted after one HTTP request. Path excludes the query string.
type RequestObserver ¶ added in v0.13.0
type RequestObserver func(RequestEvent)
Click to show internal directories.
Click to hide internal directories.