Documentation
¶
Overview ¶
Package app wires configuration into running components and serves them.
New builds, in order: blob storage, the site registry, the document store, the pub/sub broker, the people directory, the authenticator, the realtime hub, the AI router, the warehouse service, the embedded deploy gateway and finally the HTTP server. Close releases them in reverse order. Run serves the handler (and an optional metrics listener) until its context is cancelled, then shuts down gracefully.
With mcp.enabled the authenticator also is the Claude connector's authorization server (auth.MCPOf), and the remote MCP endpoint (internal/mcpremote) is built on the same registry, storage, document store and gateway as the hub.
With Options.GatewayOnly only storage, a bearer-only authenticator and the deploy gateway are built (`backyard gateway`); mcp.* is then ignored.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is a running Backyard instance.
func (*App) MetricsHandler ¶
MetricsHandler returns the Prometheus handler (nil in gateway-only mode).
type Options ¶
type Options struct {
Logger *slog.Logger
// DevSites maps site names to local directories served live (backyard dev).
DevSites map[string]string
// GatewayOnly serves only the deploy gateway (backyard gateway): no sites,
// no site APIs, bearer-only auth, no database.
GatewayOnly bool
// Listener, if set, is used by Run instead of listening on
// cfg.Server.Listen (tests, socket activation).
Listener net.Listener
// OnListen, if set, is called by Run with the bound address once the
// server accepts connections.
OnListen func(addr net.Addr)
// contains filtered or unexported fields
}
Options tune App construction.