lipruntime

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

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

View Source
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

View Source
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 ReloadResult = sdkreload.Result

type ReloadStatus

type ReloadStatus = sdkreload.Status

type ReloadTrigger

type ReloadTrigger = sdkreload.Trigger

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

func Build(ctx context.Context, opts Options) (*Runtime, error)

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

func (r *Runtime) Close(ctx context.Context) error

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 (r *Runtime) ExecutableEvidenceObjectID() string

func (*Runtime) ExecutableGenerationID

func (r *Runtime) ExecutableGenerationID() int64

func (*Runtime) ExecutableGenerationState

func (r *Runtime) ExecutableGenerationState() controlplane.CapabilityState

func (*Runtime) ExecutableGenerationVersion

func (r *Runtime) ExecutableGenerationVersion() string

func (*Runtime) ExecutorView

func (r *Runtime) ExecutorView() lipsdk.ExecutorView

func (*Runtime) HasProductionEvidenceSink

func (r *Runtime) HasProductionEvidenceSink() bool

func (*Runtime) HasProductionMetering

func (r *Runtime) HasProductionMetering() bool

func (*Runtime) HasProductionMeteringQuerier

func (r *Runtime) HasProductionMeteringQuerier() bool

func (*Runtime) HasTrafficObservers

func (r *Runtime) HasTrafficObservers() bool

func (*Runtime) HasUsageObservers

func (r *Runtime) HasUsageObservers() bool

func (*Runtime) MeteringQuerier

func (r *Runtime) MeteringQuerier() metering.Querier

func (*Runtime) ReadinessReport

func (r *Runtime) ReadinessReport() controlplane.ReadinessReportReader

func (*Runtime) Ready

func (r *Runtime) Ready() bool

func (*Runtime) RefreshSnapshots

func (r *Runtime) RefreshSnapshots(ctx context.Context) error

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 (r *Runtime) SnapshotGenerationID() int64

func (*Runtime) SnapshotUsageVersion

func (r *Runtime) SnapshotUsageVersion() string

type TriggerKind

type TriggerKind = sdkreload.TriggerKind

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL