Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMCPHandler ¶ added in v0.14.20
BuildMCPHandler initialises the connector layer (DB + connectors bootstrap) and returns a ready-to-serve MCP handler + admin context. Callers must either call ServeStdioOS (for the production stdio path) or ServeStdio with a custom reader/writer (for exec/test paths).
func RunMCPStdio ¶ added in v0.5.1
func RunMCPStdio(version, commit, buildTime string)
RunMCPStdio initialises the connector layer and serves MCP JSON-RPC over stdin/stdout. Intended for local clients (Claude Desktop, Cursor).
func SetBuildInfo ¶ added in v0.23.3
func SetBuildInfo(wickVersion, commit, builtAt string)
SetBuildInfo wires the static build metadata shown on the System page (wick version, commit, build time) — the same trio wick_info reports. Call before NewServer.
func SetReleaseInfo ¶ added in v0.23.3
func SetReleaseInfo(currentVersion, repo, pat string)
SetReleaseInfo wires the release source for the web self-updater. Call before NewServer. currentVersion is the running binary's version string (e.g. app.BuildAppVersion); repo is "owner/repo"; pat is the read-only download token (may be empty for public repos).
Types ¶
type BootGate ¶ added in v0.16.12
type BootGate struct {
// contains filtered or unexported fields
}
BootGate tracks the set of asynchronous boot steps that must finish before the HTTP surface is opened to users. It replaces the single bootReady bool: each async step Register()s itself while booting and Done()s when finished, and the gate only lifts once EVERY registered step is done. This makes "add another thing that must complete before the app is usable" a two-line change (Register + Done) instead of a fragile single flag that whichever goroutine finishes first might flip too early.
All methods are safe for concurrent use. Ready() and PhaseLabel() are hot (hit on every gated request) so they read lock-free via atomics.
func NewBootGate ¶ added in v0.16.12
NewBootGate returns a gate with the given initial phase label key. The gate starts NOT ready; call Register for each async step, then Done as each finishes. If no step is ever registered the gate must be lifted explicitly with MarkReady (used when there is genuinely nothing to wait for).
func (*BootGate) Done ¶ added in v0.16.12
Done marks a registered step finished. When the last pending step completes, the gate flips ready and logs that the gate has lifted. Calling Done for an unregistered or already-done name is a no-op (besides a debug log) so it is safe on every exit path of a goroutine.
func (*BootGate) MarkReady ¶ added in v0.16.12
MarkReady lifts the gate unconditionally. Used when no async step was registered at all (nothing to wait for) so the server doesn't sit behind the gate forever. No-op if already ready.
func (*BootGate) PhaseLabel ¶ added in v0.16.12
PhaseLabel returns the message for the current phase. Lock-free.
func (*BootGate) Ready ¶ added in v0.16.12
Ready reports whether the gate has lifted. Lock-free; hit per request.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) JobsSvc ¶ added in v0.12.0
JobsSvc returns the manager.Service the API server owns. Exposed so the single-node `lab all` entrypoint can hand it to worker.RunScheduler — both the HTTP handlers and the cron loop then share one Service, avoiding the double-fire race two independent Services would have.