volumes

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupRollbackTargetVolumes

func CleanupRollbackTargetVolumes(ctx context.Context, dockerClient *client.Client, volumes []JournalVolume) error

func EnsureTargetsReadyForCleanup

func EnsureTargetsReadyForCleanup(ctx context.Context, dockerClient *client.Client, volumes []JournalVolume) error

func NewSourceCleanupError

func NewSourceCleanupError(sourceVolume string, err error) error

func NewTargetPreservedDuringRollbackError

func NewTargetPreservedDuringRollbackError(vol JournalVolume, err error) error

func OnlyPreservedTargetErrors

func OnlyPreservedTargetErrors(err error) bool

func RemoveSourceVolumes

func RemoveSourceVolumes(ctx context.Context, dockerClient *client.Client, volumes []JournalVolume) error

func RollbackVolume

func RollbackVolume(ctx context.Context, dockerClient *client.Client, vol JournalVolume) error

func RollbackVolumes

func RollbackVolumes(ctx context.Context, dockerClient *client.Client, volumes []JournalVolume) error

func VolumeExists

func VolumeExists(ctx context.Context, dockerClient *client.Client, name string) (bool, error)

Types

type Committer

type Committer interface {
	Commit(ctx context.Context) error
}

type JournalSource

type JournalSource interface {
	JournalVolumes() []JournalVolume
}

type JournalVolume

type JournalVolume struct {
	Key     string            `json:"key"`
	OldName string            `json:"oldName"`
	NewName string            `json:"newName"`
	Driver  string            `json:"driver,omitempty"`
	Options map[string]string `json:"options,omitempty"`
	Labels  map[string]string `json:"labels,omitempty"`
}

type Migration

type Migration interface {
	Apply(ctx context.Context) error
	Rollback(ctx context.Context) error
}

func PlanMigration

func PlanMigration(ctx context.Context, dockerClient *client.Client, composeProject *composetypes.Project, oldComposeName, newComposeName string) (Migration, error)

type ProjectVolumeRenameConflictError

type ProjectVolumeRenameConflictError struct {
	VolumeName string
}

func (*ProjectVolumeRenameConflictError) Error

type ProjectVolumeRenameInUseError

type ProjectVolumeRenameInUseError struct {
	VolumeName   string
	ContainerIDs []string
}

func (*ProjectVolumeRenameInUseError) Error

type ProjectVolumeRenameInsufficientSpaceError

type ProjectVolumeRenameInsufficientSpaceError struct {
	SourceVolume string
	TargetVolume string
	Detail       string
}

func (*ProjectVolumeRenameInsufficientSpaceError) Error

type SourceCleanupError

type SourceCleanupError struct {
	SourceVolume string
	Err          error
}

func (*SourceCleanupError) Error

func (e *SourceCleanupError) Error() string

func (*SourceCleanupError) Unwrap

func (e *SourceCleanupError) Unwrap() error

type TargetMissingWithSourceError

type TargetMissingWithSourceError struct {
	SourceVolume string
	TargetVolume string
}

func (*TargetMissingWithSourceError) Error

type TargetPreservedDuringRollbackError

type TargetPreservedDuringRollbackError struct {
	SourceVolume string
	TargetVolume string
	Err          error
}

func (*TargetPreservedDuringRollbackError) Error

func (*TargetPreservedDuringRollbackError) Unwrap

type VolumesExternallyRemovedError

type VolumesExternallyRemovedError struct {
	Volumes []JournalVolume
}

func (*VolumesExternallyRemovedError) Error

Jump to

Keyboard shortcuts

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