manager

package
v0.0.0-...-bd1a880 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package manager provides a concrete implementation of the volume.Service interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager implements the volume.Service interface

func New

func New(options Options) (*Manager, error)

New creates a new Manager

func (*Manager) Backup

func (m *Manager) Backup(ctx context.Context, name string, options volumepkg.BackupOptions) (io.ReadCloser, error)

Backup creates a backup of a volume

func (*Manager) CleanupExpiredContainers

func (m *Manager) CleanupExpiredContainers()

CleanupExpiredContainers periodically checks and cleans up expired temporary containers

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, name string, options volumepkg.CreateOptions) (*models.Volume, error)

Create creates a new volume

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, name string, options volumepkg.GetOptions) (*models.Volume, error)

Get gets a volume by name

func (*Manager) GetEvents

func (m *Manager) GetEvents(ctx context.Context, options volumepkg.EventOptions) (<-chan events.Message, <-chan error)

GetEvents subscribes to volume events

func (*Manager) InspectRaw

func (m *Manager) InspectRaw(ctx context.Context, name string) (dockertypesvolume.Volume, error)

InspectRaw gets the raw information about a volume

func (*Manager) List

func (m *Manager) List(ctx context.Context, options volumepkg.ListOptions) ([]*models.Volume, error)

List lists volumes

func (*Manager) Prune

Prune removes unused volumes Use dockertypesvolume.PruneReport as return type

func (*Manager) Remove

func (m *Manager) Remove(ctx context.Context, name string, options volumepkg.RemoveOptions) error

Remove removes a volume

func (*Manager) Restore

func (m *Manager) Restore(ctx context.Context, name string, reader io.Reader, options volumepkg.RestoreOptions) error

Restore restores a volume from a backup

func (*Manager) Update

func (m *Manager) Update(ctx context.Context, name string, metadata map[string]string, options volumepkg.UpdateOptions) error

Update updates a volume's metadata (Note: Docker API doesn't directly support updating volume metadata like labels after creation)

type Options

type Options struct {
	// Client is the Docker client
	Client clientpkg.CommonAPIClient // Use aliased client interface type

	// Logger is the logger
	Logger *logrus.Logger
}

Options contains options for creating a Manager

Jump to

Keyboard shortcuts

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