Documentation
¶
Overview ¶
Package bootstrap assembles and runs Deploy.
Core owns its infrastructure and lifecycle. Embedding binaries customize only the deliberately public options supplied to AssembleCore or Run.
Index ¶
- func Run(version string, functionalOptions ...Option) error
- type Core
- type IHTTPService
- type Option
- func WithBrand(brand webui.Brand) Option
- func WithComponent(definition *component.Definition) Option
- func WithHTTPService(service IHTTPService) Option
- func WithHarnessFactory(factory harness.IFactory) Option
- func WithNavItem(item webui.NavItem) Option
- func WithPII() Option
- func WithUIOverlay(overlay fs.FS) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core is one fully assembled deploy control plane. Run consumes the assembled resources, blocks for their complete lifecycle, and may be called exactly once.
func AssembleCore ¶
func AssembleCore( ctx context.Context, version string, functionalOptions ...Option, ) (*Core, error)
AssembleCore builds the service in dependency order without starting any worker or listener. The returned Core owns every assembled dependency; its Run method releases them on every exit path and may be called exactly once.
type IHTTPService ¶
IHTTPService is one optional component that mounts routes on Core's single caller-owned Gin engine.
type Option ¶
type Option func(settings *assemblyOptions) error
Option changes one public Core assembly policy.
func WithBrand ¶
WithBrand replaces the stock Deploy identity: the product name, the agent name, the wordmark, and the web UI's design tokens. Unset Brand fields keep their stock values.
The brand is applied in one place and read in two: Core stamps the two brand-bearing names into every snapshot it produces, and the web UI renders the wordmark and serves the palette. Both receive the same resolved value, so the pages and the browser client cannot disagree about who they are.
func WithComponent ¶
func WithComponent(definition *component.Definition) Option
WithComponent registers one component the embedding repository owns. Core assembles it after its own dependencies and before the agent harness, starts it immediately before the harness starts, and stops it after the harness closes, in the exact reverse of the resolved order. The option is repeatable; registered components resolve among themselves by their declared requirements, with registration order breaking ties.
func WithHTTPService ¶
func WithHTTPService(service IHTTPService) Option
WithHTTPService adds a caller-supplied HTTP component beside Core's default API and Web UI on the same Gin engine.
func WithHarnessFactory ¶
WithHarnessFactory replaces the configuration-selected built-in harness. Core continues to own persistence, fleet observation, reconciliation, and the HTTP surface around the supplied implementation.
func WithNavItem ¶
WithNavItem appends one entry to the operator sidebar, after Core's own Home, Apps, Fleet, and Activity entries. It is repeatable, entries render in registration order, and an entry that cannot be rendered as one labeled link fails assembly before any infrastructure is opened.
A registered entry is a plain link to somewhere the embedding product already serves — a page it mounted with WithHTTPService, for instance. Core's own routes, including the /claws/... paths, are unchanged by one.
func WithPII ¶
func WithPII() Option
WithPII permits raw configuration-derived values in returned errors and structured diagnostics. Without this option, Core redacts its known secrets.
func WithUIOverlay ¶
WithUIOverlay resolves the operator UI's templates and assets against a caller-supplied filesystem before the embedded one. The overlay carries a templates/ subtree whose files redefine the shipped named blocks and an assets/ subtree whose files replace the embedded asset of the same name; anything the overlay does not name keeps shipping from Core. The supported block names and the data each receives are documented on the webui package.
Only one overlay may be supplied, and a nil one is rejected here rather than silently ignored. A template that does not parse fails Core's HTTP startup component, since that is where the pages are built.