provisioner

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(provider types.ResourceProvisionType, f Factory)

Register adds a provider factory. Intended to be called from a provider package's init(); last writer wins.

Types

type Factory

type Factory func(s store.Store, injector error_injection.Injector) (Provisioner, error)

Factory constructs a Provisioner for a provider.

Providers self-register their factory from init() (see resource_manager/provider/*), so adding a provider requires no edits to this package or the factory — the dependency points provider -> provisioner only, never the reverse.

type Provisioner

type Provisioner interface {
	// Provision allocates resources according to the given specification.
	// It returns a ProvisionResult containing the provision ID and status.
	// The operation should be idempotent - calling with the same IdempotencyKey
	// should return the same result without creating duplicate resources.
	Provision(ctx context.Context, req *types.ResourceProvision) (*types.ProvisionResult, error)

	// Release deallocates resources for the given provision.
	Release(ctx context.Context, provisionID string) error

	// List retrieves provisions matching the given criteria.
	List(ctx context.Context, opts *types.ListOptions) ([]*types.ProvisionResult, error)

	// Type returns the resource provision type
	Type() types.ResourceProvisionType
}

Provisioner is the main interface for resource provisioning. Implementations should support idempotent operations using IdempotencyKey.

func NewProvisioner

func NewProvisioner(provider types.ResourceProvisionType, s store.Store, injector error_injection.Injector) (Provisioner, error)

Jump to

Keyboard shortcuts

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