provider

package
v1.13.1 Latest Latest
Warning

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

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

Documentation

Overview

Package provider defines deployment adapters shared by the CLI and workbench.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("not supported by this provider")

Functions

This section is empty.

Types

type BundleRelocator

type BundleRelocator interface {
	Relocate(deployment *model.Deployment, bundle *render.Bundle, directory string) (*render.Bundle, error)
}

BundleRelocator adjusts build paths in an approved export for another directory.

type DestroyOptions

type DestroyOptions struct{ DeleteData bool }

type EnvRef

type EnvRef struct{ Target, Env string }

type Event

type Event struct {
	Op      string       `json:"op"`
	Status  state.Status `json:"status"`
	Message string       `json:"message"`
}

type ExportOnly

type ExportOnly struct{ ProviderName string }

ExportOnly gives adapters explicit unsupported defaults for unimplemented operations.

func (ExportOnly) Apply

func (ExportOnly) Apply(context.Context, *plan.Plan, *state.Store, map[string]string, chan<- Event) error

func (ExportOnly) Capabilities

func (ExportOnly) Destroy

func (ExportOnly) Logs

func (ExportOnly) Name

func (e ExportOnly) Name() string

func (ExportOnly) Observe

func (ExportOnly) Render

func (ExportOnly) Rollback

func (ExportOnly) Validate

type Factory

type Factory func(execx.Runner, string) Provider

type IdentityObserver

type IdentityObserver interface {
	SnapshotIDs(ctx context.Context, deployment *model.Deployment) (map[string][]string, error)
}

IdentityObserver reads current remote identities without changing workloads.

type LogOptions

type LogOptions struct {
	Follow bool
	Tail   int
}

type Preflighter

type Preflighter interface {
	Preflight(ctx context.Context, deployment *model.Deployment) error
}

Preflighter checks target access and delivery before mutations.

type Provider

type Provider interface {
	Name() string
	Capabilities(ctx context.Context, target spec.Target) (model.Capabilities, error)
	Validate(ctx context.Context, deployment *model.Deployment) output.Diagnostics
	Render(ctx context.Context, deployment *model.Deployment) (*render.Bundle, error)
	Operations(ctx context.Context, deployment *model.Deployment, bundle *render.Bundle, snapshot state.Snapshot) ([]plan.Operation, error)
	Apply(ctx context.Context, p *plan.Plan, store *state.Store, values map[string]string, events chan<- Event) error
	Observe(ctx context.Context, ref EnvRef, store *state.Store) (Status, error)
	Logs(ctx context.Context, ref ServiceRef, options LogOptions) (io.ReadCloser, error)
	Rollback(ctx context.Context, ref EnvRef, store *state.Store, release string) error
	Destroy(ctx context.Context, p *plan.Plan, store *state.Store, options DestroyOptions) error
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(runner execx.Runner, root string, factories ...Factory) *Registry

func (*Registry) Get

func (r *Registry) Get(name string) (Provider, bool)

func (*Registry) Names

func (r *Registry) Names() []string

func (*Registry) Register

func (r *Registry) Register(p Provider) error

Register adds a trusted adapter without replacing an existing provider.

type ServiceRef

type ServiceRef struct{ Target, Env, Service string }

type ServiceStatus

type ServiceStatus struct {
	Ready         int         `json:"ready"`
	Desired       int         `json:"desired"`
	Image         model.Image `json:"image"`
	IntendedImage model.Image `json:"intended_image"`
	Message       string      `json:"message"`
}

type Status

type Status struct {
	FailedOperation string                   `json:"failed_operation,omitempty"`
	Overall         state.Status             `json:"overall"`
	Services        map[string]ServiceStatus `json:"services"`
	Resources       map[string]state.Status  `json:"resources"`
	Routes          []string                 `json:"routes"`
}

Directories

Path Synopsis
Package compose deploys and observes services with Docker Compose v2.
Package compose deploys and observes services with Docker Compose v2.
Package handoff exports portable Compose graphs for platforms without a qualified native adapter.
Package handoff exports portable Compose graphs for platforms without a qualified native adapter.
Package hosted exports ctrlplane-compatible workload contracts without account-side mutation.
Package hosted exports ctrlplane-compatible workload contracts without account-side mutation.
Package kubernetes renders and deploys approved graphs to an explicit cluster context.
Package kubernetes renders and deploys approved graphs to an explicit cluster context.
Package managed generates schema-validated cloud provider handoffs.
Package managed generates schema-validated cloud provider handoffs.

Jump to

Keyboard shortcuts

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