Documentation
¶
Overview ¶
Package host is the public composition boundary for the Pixie assistant.
The assistant implementation is deliberately hidden behind this package. Consumers (including the full-host binary) must use this facade rather than importing an assistant implementation package or carrying a second supervisor. The native engine is supplied by the assistant build; this package only owns the stable configuration and lifecycle seam shared by both entrypoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminBridgeConfig ¶
type AdminBridgeConfig struct {
// Enabled is the opt-in switch. It comes from PIXIE_ADMIN_BRIDGE=1 or the
// assistant config file and never defaults on.
Enabled bool
// Executable runs the sidecar (normally a Bun binary). Args precede the
// manager-appended --package/--agent-dir pair.
Executable string
Args []string
// PackagePath is the absolute path to the selected installation directory
// or its package.json. It is verified before any operation is advertised.
PackagePath string
}
AdminBridgeConfig is the explicit operator opt-in for the administration sidecar. Zero value (Enabled false) keeps the bridge entirely off.
type Config ¶
type Config struct {
Host string
Port int
Secret string
AgentDir string
PiExecutable string
PiArgs []string
Llama bool
// AllowSelfRestart opts the host into the explicit runtime.restart
// operation. The response drains the process and the service manager
// restarts it; the default stays fail-closed.
AllowSelfRestart bool
// ProtocolMode is the raw PIXIE_PI_PROTOCOL value (v1, auto or v2,
// case-insensitive). Empty selects v1. An invalid value fails Start.
ProtocolMode string
// AdminBridge is the explicit opt-in administration sidecar. Its zero
// value keeps every administration operation false and starts no process.
AdminBridge AdminBridgeConfig
}
Config contains the assistant-owned startup inputs. The full-host composition supplies this same value to the shared engine instead of constructing a second supervisor or SDK client.
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle is the lifecycle handle returned by Start. Its methods form the deliberately small public surface needed by standalone and full-host entrypoints. A zero Handle is safe to close, which keeps composition roots straightforward during staged engine migration.
func Start ¶
Start starts the shared assistant engine for config.
The Go facade owns the private lifecycle endpoint used by the full-host composition. When PiExecutable is provided, the selected Pi is launched as one bounded child per resident logical session and all native execution remains behind this facade. A missing executable keeps the transport useful for composition tests but advertises no native capability rather than starting another SDK process.
func (*Handle) Close ¶
Close releases assistant-owned resources and waits for the private listener to stop, bounded by the caller's context.
func (*Handle) Endpoint ¶
Endpoint returns the authenticated host transport endpoint selected by the engine. It is intentionally exposed as a value from the facade so the full host can dial the same engine without importing its implementation.
func (*Handle) Errors ¶
Errors reports asynchronous engine failures. A nil channel means that no engine was started.
func (*Handle) Ready ¶
func (h *Handle) Ready() <-chan struct{}
Ready is closed when the shared engine has completed startup.
func (*Handle) RestartRequested ¶
func (h *Handle) RestartRequested() <-chan struct{}
RestartRequested is closed after an accepted runtime.restart. The process owner drains and exits with the service-manager restart code.