Documentation
¶
Overview ¶
Package provider holds the shared provider-registration surface.
AccessType declares when a provider's methods are available (plan construction, execution, or both), and the instance plumbing hands tools their provider singletons.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Instance ¶
func Instance[T any](runtimeEnvironment *op.RuntimeEnvironment) (*T, error)
Instance returns the runtime environment's single instance of provider type T, constructing it on first access.
It is the generic form of op.RuntimeEnvironment.ProviderByType: it keys the lookup by reflect.TypeFor[T]() — the struct form used at registration — and asserts the cached value to *T. A collaborating provider writes provider.Instance[file.Provider](runtimeEnvironment) and receives the same *file.Provider that every other consumer in the environment holds, built on first access and cached for the environment's lifetime.
Parameters:
- `runtimeEnvironment`: the runtime environment whose provider cache supplies the instance.
Returns:
- `*T`: the one environment-scoped instance of T, constructed on first access.
- `error`: non-nil if T is not a registered provider, the cached value is not *T, or construction fails.
Types ¶
type AccessType ¶
type AccessType string
AccessType defines when a provider's methods are available.
const ( Immediate AccessType = "immediate" // direct call during plan construction Planned AccessType = "planned" // graph node only — executed at runtime Both AccessType = "both" // available in both projections )
The access modes.
type Lifetime ¶
type Lifetime string
Lifetime declares a provider's lifecycle semantics.
The value is set via a "// +devlore:lifetime=" directive on the ReceiverFactory struct and emitted by the code generator into provider descriptor registrations.
const ( Stateless Lifetime = "stateless" // safe to cache indefinitely and share across threads Subgraph Lifetime = "subgraph" // fresh instance per subgraph; Close() at subgraph boundary Session Lifetime = "session" // single instance for the session; Close() at session end )
Lifetime constants define caching, sharing, and cleanup behavior.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package appnet provides network actions for the operation graph.
|
Package appnet provides network actions for the operation graph. |
|
Package archive provides archive extraction actions for the operation graph.
|
Package archive provides archive extraction actions for the operation graph. |
|
Package elevator is a STUB / PLACEHOLDER for the privilege-elevation provider — the mechanism that fulfills the elevation policy ([6.1-privilege-elevation.md]).
|
Package elevator is a STUB / PLACEHOLDER for the privilege-elevation provider — the mechanism that fulfills the elevation policy ([6.1-privilege-elevation.md]). |
|
Package encryption provides encryption and decryption actions for the operation graph.
|
Package encryption provides encryption and decryption actions for the operation graph. |
|
Package file provides file system actions for the operation graph.
|
Package file provides file system actions for the operation graph. |
|
Package flow implements flow-control methods for execution graphs.
|
Package flow implements flow-control methods for execution graphs. |
|
Package function is the function provider: session-scoped Starlark function resources.
|
Package function is the function provider: session-scoped Starlark function resources. |
|
Package json provides JSON encoding and decoding for the operation graph.
|
Package json provides JSON encoding and decoding for the operation graph. |
|
Package mem is the in-memory resource provider.
|
Package mem is the in-memory resource provider. |
|
Package pkg provides package management actions for the operation graph.
|
Package pkg provides package management actions for the operation graph. |
|
Package plan provides graph-construction actions for the plan namespace.
|
Package plan provides graph-construction actions for the plan namespace. |
|
Package platform provides access to platform information by graph actions and executing receivers.
|
Package platform provides access to platform information by graph actions and executing receivers. |
|
Package powershell provides PowerShell 7+ command execution actions for the operation graph.
|
Package powershell provides PowerShell 7+ command execution actions for the operation graph. |
|
Package regex provides regular expression operations for the operation graph.
|
Package regex provides regular expression operations for the operation graph. |
|
Package service provides platform-agnostic service management actions.
|
Package service provides platform-agnostic service management actions. |
|
Package shell provides POSIX shell command execution actions for the operation graph.
|
Package shell provides POSIX shell command execution actions for the operation graph. |
|
Package template provides template expansion actions for the operation graph.
|
Package template provides template expansion actions for the operation graph. |
|
Package ui exposes the runtime environment's [status.Narrator] capability to starlark.
|
Package ui exposes the runtime environment's [status.Narrator] capability to starlark. |
|
Package yaml provides YAML encoding and decoding for the operation graph.
|
Package yaml provides YAML encoding and decoding for the operation graph. |