Documentation
¶
Overview ¶
Package settings adapts the public catalog configuration to Starmap commands.
Index ¶
Constants ¶
const ( Prefix = catalogconfig.Prefix AuthorityOrigin = catalogconfig.AuthorityOrigin Source = catalogconfig.Source SourceURL = catalogconfig.SourceURL SourceAPIKey = catalogconfig.SourceAPIKey SourceRepository = catalogconfig.SourceRepository SourceChannel = catalogconfig.SourceChannel SourceSignerWorkflow = catalogconfig.SourceSignerWorkflow SourceToken = catalogconfig.SourceToken SourceRefreshMode = catalogconfig.SourceRefreshMode GenerationPin = catalogconfig.GenerationPin RetentionEnabled = catalogconfig.RetentionEnabled RetentionInterval = catalogconfig.RetentionInterval RetentionMaxGenerations = catalogconfig.RetentionMaxGenerations RetentionMaxBytes = catalogconfig.RetentionMaxBytes RetentionScanEntries = catalogconfig.RetentionScanEntries RetentionInputMaxBytes = catalogconfig.RetentionInputMaxBytes NetworkMode = catalogconfig.NetworkMode SourcePollInterval = catalogconfig.SourcePollInterval SourceStartupPolicy = catalogconfig.SourceStartupPolicy SourceAuthorityID = catalogconfig.SourceAuthorityID SourcePolicyID = catalogconfig.SourcePolicyID SourceMaxAge = catalogconfig.SourceMaxAge SourceMaxHops = catalogconfig.SourceMaxHops SourceAliases = catalogconfig.SourceAliases AcquisitionSources = catalogconfig.AcquisitionSources ModelsDevGitCommit = catalogconfig.ModelsDevGitCommit AcquisitionEnabled = catalogconfig.AcquisitionEnabled AcquisitionInterval = catalogconfig.AcquisitionInterval ProviderBindings = catalogconfig.ProviderBindings CoalesceWindow = catalogconfig.CoalesceWindow WorkspacePath = catalogconfig.WorkspacePath StartupSpread = catalogconfig.StartupSpread TransferIdleTimeout = catalogconfig.TransferIdleTimeout TransferMaxDuration = catalogconfig.TransferMaxDuration RefreshTimeout = catalogconfig.RefreshTimeout StateDirectory = catalogconfig.StateDirectory SchedulerIdentity = catalogconfig.SchedulerIdentity PermissionClockSource = catalogconfig.PermissionClockSource PermissionClockRefreshInterval = catalogconfig.PermissionClockRefreshInterval PermissionClockMaxAge = catalogconfig.PermissionClockMaxAge PermissionClockMaxDriftPPM = catalogconfig.PermissionClockMaxDriftPPM PermissionClockCounterUncertainty = catalogconfig.PermissionClockCounterUncertainty PermissionClockWindowsMaxSourceAge = catalogconfig.PermissionClockWindowsMaxSourceAge PermissionClockWindowsMaxSourceDriftPPM = catalogconfig.PermissionClockWindowsMaxSourceDriftPPM PermissionClockWindowsSourceUncertainty = catalogconfig.PermissionClockWindowsSourceUncertainty )
Canonical names remain available to application composition.
Variables ¶
This section is empty.
Functions ¶
func RegisterFlags ¶
RegisterFlags registers one string flag for every canonical catalog setting. A flag carries the kebab-case name of its setting. A flag value follows the same grammar as the environment value, so one parser reads both.
Types ¶
type Composition ¶
type Composition struct {
// Config holds the canonical settings the process read.
Config Config
// Source supplies an upstream source implementation. It overrides the
// source that the settings select, so a test injects a hermetic source.
Source runtime.Source
// Acquirer collects provider observations. A runtime without one observes
// no provider.
Acquirer runtime.Acquirer
// LeaseStore fences the durable generation commit of a replicated
// deployment. A single instance needs none.
LeaseStore runtime.LeaseStore
// OriginStore supplies the selected catalog store for an explicit origin declaration.
// Composition constructs no store and starts no storage I/O.
OriginStore storage.Store
// Base holds options that the process supplies before every setting. A
// canonical setting overrides a base option of the same name.
Base []runtime.Option
// Extra holds options that one command supplies last. The serve command
// supplies its listen address here, so two replicas on one host take
// separate schedule phases.
Extra []runtime.Option
}
Composition builds the connected runtime of one process. It joins the parsed canonical settings with the roles that the process injects: the catalog store, the provider acquirer, and an optional upstream source implementation.
The root package cannot construct the Starmap cascade source, because the cascade subscriber imports the root package. This composition step is therefore the one place that builds it from the canonical settings.
func (Composition) Open ¶
Open composes the options and opens the connected runtime. The runtime serves the verified embedded catalog immediately and pulls its source in the background.
func (Composition) Options ¶
func (c Composition) Options() ([]runtime.Option, error)
Options returns the runtime options in precedence order: the process base options first, then canonical runtime options and the host clock, then the injected roles. A later option replaces an earlier one, so a canonical setting always wins over a base default.
type Lookup ¶
type Lookup = catalogconfig.Lookup
Lookup is a caller-supplied setting reader.
func FlagLookup ¶
FlagLookup reads a canonical setting from a registered flag. It reports only a flag that the caller changed, so an untouched flag never replaces the environment value.