Documentation
¶
Overview ¶
Package composition declares the build-time composition of Bomly's embedded (native) components as execution-neutral sdk.Module entries. The registry consumes Entries() and registers each module through Registry.RegisterModule instead of bespoke per-component wiring. Build-tag variants (composition_full.go / composition_lite.go) decide which implementation backs tag-sensitive entries such as grype.
Index ¶
Constants ¶
const ( // ImplementationNative marks a component compiled into the host binary. ImplementationNative = "native" // ImplementationPlugin marks a component backed by an external managed // plugin process. ImplementationPlugin = "plugin" )
Implementation values accepted by Entry.Implementation.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Logger *zap.Logger
HTTPClientProvider *sdk.HTTPClientProvider
OsvAPIBase string
OsvCacheDir string
OsvCacheTTL string
KEVCacheDir string
KEVCacheTTL string
ScorecardAPIBase string
ScorecardCacheDir string
ScorecardCacheTTL string
}
Deps carries the host-resolved inputs module constructors need. It mirrors what the registry's bespoke matcher/analyzer wiring used to pass: configuration overrides, the shared logger, and the shared HTTP client provider.
type Entry ¶
type Entry struct {
// Name is the component's descriptor name.
Name string
// Kind is the component's plugin kind.
Kind sdk.PluginKind
// Implementation is ImplementationNative or ImplementationPlugin.
Implementation string
// DefaultEnabled reports whether the component runs without explicit
// selection.
DefaultEnabled bool
// Module builds the execution-neutral module for this entry.
Module func(Deps) sdk.Module
}
Entry describes one composed component.
func Entries ¶
func Entries() []Entry
Entries returns the composed component entries for this build variant, in registration order.