provider

package
v0.1.0-dev.20260905002203 Latest Latest
Warning

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

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

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.

Directories

Path Synopsis
Package appnet provides network actions for the operation graph.
Package appnet provides network actions for the operation graph.
gen
Package archive provides archive extraction actions for the operation graph.
Package archive provides archive extraction actions for the operation graph.
gen
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.
gen
Package file provides file system actions for the operation graph.
Package file provides file system actions for the operation graph.
gen
Package flow implements flow-control methods for execution graphs.
Package flow implements flow-control methods for execution graphs.
gen
Package function is the function provider: session-scoped Starlark function resources.
Package function is the function provider: session-scoped Starlark function resources.
gen
git
gen
Package json provides JSON encoding and decoding for the operation graph.
Package json provides JSON encoding and decoding for the operation graph.
gen
mem
Package mem is the in-memory resource provider.
Package mem is the in-memory resource provider.
gen
pkg
Package pkg provides package management actions for the operation graph.
Package pkg provides package management actions for the operation graph.
gen
Package plan provides graph-construction actions for the plan namespace.
Package plan provides graph-construction actions for the plan namespace.
gen
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.
gen
Package powershell provides PowerShell 7+ command execution actions for the operation graph.
Package powershell provides PowerShell 7+ command execution actions for the operation graph.
gen
Package regex provides regular expression operations for the operation graph.
Package regex provides regular expression operations for the operation graph.
gen
Package service provides platform-agnostic service management actions.
Package service provides platform-agnostic service management actions.
gen
Package shell provides POSIX shell command execution actions for the operation graph.
Package shell provides POSIX shell command execution actions for the operation graph.
gen
Package template provides template expansion actions for the operation graph.
Package template provides template expansion actions for the operation graph.
gen
ui
Package ui exposes the runtime environment's [status.Narrator] capability to starlark.
Package ui exposes the runtime environment's [status.Narrator] capability to starlark.
gen
Package yaml provides YAML encoding and decoding for the operation graph.
Package yaml provides YAML encoding and decoding for the operation graph.
gen

Jump to

Keyboard shortcuts

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