Help us shape the future of Go! Take the 2026 Go Developer Survey

docker

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package docker provisions services that fill declared slots: postgres, mysql, redis.

A provisioned service joins the app's private bundle. It is not exposed, not addressable from outside, and not shareable with another app (R-134) — sharing is expressed as two apps binding to one external target.

Index

Constants

View Source
const Kind = "docker"

Kind is the adapter kind.

Variables

This section is empty.

Functions

func Info

func Info() api.KindInfo

Info describes this kind of adapter for the forms that configure one (api.KindInfo, R-261).

Types

type Adapter

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

Adapter provisions in-bundle services.

It talks to no daemon. That is the whole design: a provisioned service is a workload like any other, so this adapter *plans* one and the runtime adapter runs it. Two consequences follow, and both are the point.

The service is reachable only from inside the app's private network, because that is the only network its workloads are on and nothing publishes a port (R-134). There is no code here that could accidentally expose it.

Its data is in a Pando volume, so it is recorded, backed up with the app, carried in the DR bundle, offered at delete and reclaimed afterwards — all by machinery that already exists and knows nothing about services (R-135).

func New

func New() *Adapter

New returns an unconfigured adapter.

func (*Adapter) Capabilities

func (a *Adapter) Capabilities() api.ServicesCapabilities

Capabilities reports that provisioned data lives in the app's own volumes.

func (*Adapter) Category

func (a *Adapter) Category() api.Category

func (*Adapter) Configure

func (a *Adapter) Configure(_ context.Context, raw json.RawMessage) error

func (*Adapter) Destroy

func (a *Adapter) Destroy(_ context.Context, _ api.ServiceHandle) error

Destroy releases a provisioned service.

A no-op, and not a stub. The service is workloads and a volume inside the app's bundle; the runtime destroys the workloads with the bundle and the volume follows R-204 and R-135, which means it outlives the app on purpose and is reclaimed once it is backed up. Destroying it here would delete an app's database out from under the backup prompt that is about to offer it.

func (*Adapter) HealthCheck

func (a *Adapter) HealthCheck(_ context.Context) error

HealthCheck always passes.

There is nothing to reach: this adapter holds no connection and provisions by planning. The runtime adapter's health is what decides whether a provisioned service can actually start, and the planner already checks that.

func (*Adapter) Kind

func (a *Adapter) Kind() string

func (*Adapter) Provision

Provision plans one service instance.

Pure: no daemon call, no randomness beyond the password, and the same request twice produces the same shape. The caller stores the connection secret and hands the workloads and volumes to the runtime, which is what actually starts anything.

func (*Adapter) Restore

func (a *Adapter) Restore(_ context.Context, h api.ServiceHandle, _ io.Reader) error

Restore is refused for the same reason as Snapshot.

func (*Adapter) Snapshot

func (a *Adapter) Snapshot(_ context.Context, h api.ServiceHandle, _ io.Writer) error

Snapshot is not this adapter's job, and says so rather than returning empty.

Capabilities().DataInAppVolumes is true: the data is in a Pando volume that the backup path already snapshots. A caller reaching here has ignored the capability, and an empty tar would make that look like a service with no data — which is exactly the failure an operator discovers at restore time.

func (*Adapter) Supports

func (a *Adapter) Supports() []spec.SlotType

Supports lists the slot types this adapter can fill.

Databases and caches, deliberately nothing else. S3 and SMTP are slot types Pando recognizes (R-130) and deliberately does not provision: standing up MinIO or an SMTP server is running infrastructure, which is what R-010 says Pando is not. Those slots are bound or literal, and the planner says so by name.

Jump to

Keyboard shortcuts

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