Documentation
¶
Overview ¶
Package lipruntime is the public production composition facade for LIP.
Closed enterprise modules construct a runtime through Build (requirements 12.1–12.5). Reload/status use Runtime.Reload, Runtime.ReloadStatus, and ReloadControl (16.1–16.2). Runtime.ExecutorView is generation-dispatching (16.12–16.13). Named accessors and Runtime.Capabilities report live wiring; executable generation identity is distinct from metadata-only publication.
Index ¶
- Constants
- Variables
- type HistoryEntry
- type HostCapabilities
- type Options
- type ReloadControl
- type ReloadResult
- type ReloadStatus
- type ReloadTrigger
- type ResultCategory
- type Runtime
- func (r *Runtime) Capabilities() HostCapabilities
- func (r *Runtime) Close(ctx context.Context) error
- func (r *Runtime) ExecutableEvidenceObjectID() string
- func (r *Runtime) ExecutableGenerationID() int64
- func (r *Runtime) ExecutableGenerationState() controlplane.CapabilityState
- func (r *Runtime) ExecutableGenerationVersion() string
- func (r *Runtime) ExecutorView() lipsdk.ExecutorView
- func (r *Runtime) HasProductionEvidenceSink() bool
- func (r *Runtime) HasProductionMetering() bool
- func (r *Runtime) HasProductionMeteringQuerier() bool
- func (r *Runtime) HasTrafficObservers() bool
- func (r *Runtime) HasUsageObservers() bool
- func (r *Runtime) MeteringQuerier() metering.Querier
- func (r *Runtime) ReadinessReport() controlplane.ReadinessReportReader
- func (r *Runtime) Ready() bool
- func (r *Runtime) RefreshSnapshots(ctx context.Context) error
- func (r *Runtime) Reload(ctx context.Context, trigger ReloadTrigger) ReloadResult
- func (r *Runtime) ReloadControl() *ReloadControl
- func (r *Runtime) ReloadStatus() ReloadStatus
- func (r *Runtime) SnapshotGenerationID() int64
- func (r *Runtime) SnapshotUsageVersion() string
- type TriggerKind
Constants ¶
const ( TriggerSIGHUP = sdkreload.TriggerSIGHUP TriggerAPI = sdkreload.TriggerAPI ResultPublished = sdkreload.ResultPublished ResultNoop = sdkreload.ResultNoop ResultBusy = sdkreload.ResultBusy ResultRestartRequired = sdkreload.ResultRestartRequired ResultRetentionBlocked = sdkreload.ResultRetentionBlocked ResultInvalid = sdkreload.ResultInvalid ResultSourceIntegrity = sdkreload.ResultSourceIntegrity ResultCanceled = sdkreload.ResultCanceled ResultPreparationFailed = sdkreload.ResultPreparationFailed ResultInternalFailed = sdkreload.ResultInternalFailed )
Variables ¶
var ResultCategories = sdkreload.ResultCategories
ResultCategories re-exports the canonical closed-vocabulary accessor; each call returns a defensive copy, so callers cannot mutate shared enumeration state.
Functions ¶
This section is empty.
Types ¶
type HistoryEntry ¶
type HistoryEntry = sdkreload.HistoryEntry
type HostCapabilities ¶
type HostCapabilities = controlplane.HostCapabilities
type Options ¶
type Options struct {
// ConfigPath is the YAML runtime config path (required).
ConfigPath string
// LogWriter receives bootstrap logger output; nil means discard for library use.
LogWriter io.Writer
// MeteringRecorder overrides the config-built metering journal recorder.
MeteringRecorder metering.Recorder
// RequestRegistrations bind descriptor, priority, and request authority.
RequestRegistrations []authority.RequestRegistration
// AttemptRegistrations bind descriptor, priority, and attempt authority.
AttemptRegistrations []authority.AttemptRegistration // ConcurrencyRegistration binds descriptor and concurrency authority.
ConcurrencyRegistration *authority.ConcurrencyRegistration
// UsageSnapshotSource supplies the usage-authority source-fetch metadata
// view for publication and RefreshSnapshots. It is not enforcement evidence;
// executable generations bind descriptor-bound registrations instead.
UsageSnapshotSource economics.RuleSnapshotSource
// ConcurrencySnapshotSource supplies the concurrency source-fetch metadata
// view for publication and RefreshSnapshots.
ConcurrencySnapshotSource economics.RuleSnapshotSource
// RatingSnapshotSource supplies the rating/catalog source-fetch metadata
// view for publication and RefreshSnapshots.
RatingSnapshotSource economics.RatingSnapshotSource
// EvidenceSink projects authority decisions into policy and control-plane evidence.
EvidenceSink authority.EvidenceSink
// MeteringQuerier is the enterprise metering query mount (requirement 12.1).
// Bounded control-plane query filter expansion remains Phase 11.
MeteringQuerier metering.Querier
// TrafficObservers are merged with feature-bundle traffic observers.
TrafficObservers []traffic.Observer
// UsageObservers are merged with feature-bundle usage observers.
UsageObservers []usage.Observer
// PolicyObservers are chained into policy-decision evidence (additive to EvidenceSink).
PolicyObservers []policydecision.Observer
// FeatureHostRegistrations carries startup-only host-feature bindings
// (Requirement 9, Task 8.4).
FeatureHostRegistrations []featurehost.Registration
}
Options configures public production composition (requirement 12.3, 12.4).
Provider injection uses descriptor-bound registrations only: RequestRegistrations, AttemptRegistrations, and ConcurrencyRegistration. FeatureHostRegistrations carries typed startup-only host-feature bindings.
type ReloadControl ¶
type ReloadControl struct {
// contains filtered or unexported fields
}
ReloadControl is the importable, thread-safe public reload and status facade. It delegates to the host seam and never duplicates reload logic.
func (*ReloadControl) Reload ¶
func (c *ReloadControl) Reload(ctx context.Context, trigger ReloadTrigger) ReloadResult
Reload runs one explicit reload attempt through the bound coordinator seam.
func (*ReloadControl) Status ¶
func (c *ReloadControl) Status() ReloadStatus
Status returns a defensive copy of the safe reload status snapshot.
type ReloadResult ¶
type ReloadStatus ¶
type ReloadTrigger ¶
type ResultCategory ¶
type ResultCategory = sdkreload.ResultCategory
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime is an opaque handle over a successfully built OSS composition. Close synchronization follows the public retry/idempotency contract (req 10.1-10.4).
func Build ¶
Build constructs a production runtime from public options. Callers must not import internal packages; Build installs the standard registry. The returned Runtime owns one immutable host-facing dependency graph. Build binds one complete Host via runtimebundle.BuildHost (req 4.1, 10.1-10.4). Build stays non-money: monetary composition requires BuildWithBilling.
func BuildWithBilling ¶
func BuildWithBilling(ctx context.Context, opts Options, binding sdkbilling.Binding) (*Runtime, error)
BuildWithBilling constructs a production runtime with one explicit typed monetary binding. Ordinary Options stay non-money; the binding carries the cheap credit screen, quote/admission, terminal handoff, and lifecycle ports. BuildWithBilling delegates to the same host construction as Build: one BuildHost, one Host, one Manager, one reload path.
func (*Runtime) Capabilities ¶
func (r *Runtime) Capabilities() HostCapabilities
func (*Runtime) Close ¶
Close releases runtime resources by delegating to Host.Close (req 8.6-8.7). Calls are serialized. A successful Close is idempotent; a deadline or teardown failure remains retryable. A nil ctx is tolerated and substituted with context.Background.
func (*Runtime) ExecutableEvidenceObjectID ¶
func (*Runtime) ExecutableGenerationID ¶
func (*Runtime) ExecutableGenerationState ¶
func (r *Runtime) ExecutableGenerationState() controlplane.CapabilityState
func (*Runtime) ExecutableGenerationVersion ¶
func (*Runtime) ExecutorView ¶
func (r *Runtime) ExecutorView() lipsdk.ExecutorView
func (*Runtime) HasProductionEvidenceSink ¶
func (*Runtime) HasProductionMetering ¶
func (*Runtime) HasProductionMeteringQuerier ¶
func (*Runtime) HasTrafficObservers ¶
func (*Runtime) HasUsageObservers ¶
func (*Runtime) MeteringQuerier ¶
func (*Runtime) ReadinessReport ¶
func (r *Runtime) ReadinessReport() controlplane.ReadinessReportReader
func (*Runtime) RefreshSnapshots ¶
RefreshSnapshots returns an error when no host is bound to this runtime.
func (*Runtime) Reload ¶
func (r *Runtime) Reload(ctx context.Context, trigger ReloadTrigger) ReloadResult
Reload runs one explicit reload attempt when a host is bound to this runtime.
func (*Runtime) ReloadControl ¶
func (r *Runtime) ReloadControl() *ReloadControl
ReloadControl returns the bound reload facade, or nil when reload is unavailable.
func (*Runtime) ReloadStatus ¶
func (r *Runtime) ReloadStatus() ReloadStatus
ReloadStatus returns the safe reload status snapshot for this runtime.
func (*Runtime) SnapshotGenerationID ¶
func (*Runtime) SnapshotUsageVersion ¶
type TriggerKind ¶
type TriggerKind = sdkreload.TriggerKind