Documentation
¶
Overview ¶
Package compose is the compose-runtime backend: one adapter driving a compose CLI, with docker-compose and podman-compose as thin constructors over the same code. Podman goes through `podman compose`, the engine's own wrapper, never the third-party podman-compose tool.
The connection is the compose CLI itself. A rootless socket may be pointed at with DOCKER_HOST/CONTAINER_HOST; a socket resolving to the privileged docker socket is refused at config load, not here.
Index ¶
- type Adapter
- func (a *Adapter) Backend() domain.Backend
- func (a *Adapter) Deploy(state backend.StackState, compose string, repull bool) error
- func (a *Adapter) Observe(stack config.StackPolicy) (backend.StackState, error)
- func (a *Adapter) Preflight() error
- func (a *Adapter) RunningDigests(state backend.StackState) (map[string]string, error)
- func (a *Adapter) ServicesRunning(state backend.StackState) (bool, string, error)
- func (a *Adapter) WithContext(ctx context.Context) backend.Port
- type Handle
- type Option
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter is the compose-runtime backend.
func NewDocker ¶
func NewDocker(settings config.EngineSettings, options ...Option) *Adapter
NewDocker builds the Docker Compose adapter.
func NewPodman ¶
func NewPodman(settings config.EngineSettings, options ...Option) *Adapter
NewPodman builds the Podman Compose adapter.
func (*Adapter) Deploy ¶
Deploy writes the Compose document and brings the project up. The file is replaced atomically and always before the engine is asked to converge, so a rollback restores the previous bytes even if the engine call then fails.
func (*Adapter) Observe ¶
func (a *Adapter) Observe(stack config.StackPolicy) (backend.StackState, error)
Observe reads the stack's current state: the Compose document on disk, the resolved services, and the digests actually running.
func (*Adapter) Preflight ¶
Preflight probes the engine. There is no identity to check: the compose CLI acts as whoever runs Ripen.
func (*Adapter) RunningDigests ¶
RunningDigests re-reads which digests the project is running.
func (*Adapter) ServicesRunning ¶
ServicesRunning reports whether every service of the project is running, and healthy wherever the engine tracks a healthcheck. It is conjunctive by design: one stopped sibling blocks the Transaction.
type Handle ¶
Handle is the compose adapter's stack identity, carried on StackState from Observe into Deploy.
type Option ¶
type Option func(*Adapter)
Option adjusts an Adapter.
func WithTimeouts ¶
WithTimeouts sets the per-command and deployment timeouts.