volume

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(name string, options types.VolumeCreateOptions) (*native.Volume, error)

func Inspect

func Inspect(volumes []string, options types.VolumeInspectOptions) error

func List

func List(options types.VolumeListOptions) error

func Prune

func Prune(ctx context.Context, client *containerd.Client, options types.VolumePruneOptions) error

func Remove

func Remove(ctx context.Context, client *containerd.Client, volumes []string, options types.VolumeRemoveOptions) error

func Store

func Store(ns string, dataRoot string, address string) (volumestore.VolumeStore, error)

Store returns a volume store that corresponds to a directory like `/var/lib/nerdctl/1935db59/volumes/default`

func Volumes

func Volumes(ns string, dataRoot string, address string, volumeSize bool, filters []string) (map[string]native.Volume, error)

Volumes returns volumes that match the given filters.

Supported filters:

  • label=<key>=<value>: Match volumes by label on both key and value. If value is left empty, match all volumes with key regardless of its value.
  • name=<value>: Match all volumes with a name containing the value string.
  • size=<value>: Match all volumes with a size meets the value. Size operand can be >=, <=, >, <, = and value must be an integer.

Unsupported filters:

  • dangling=true: Filter volumes by dangling.
  • driver=local: Filter volumes by driver.

Types

This section is empty.

Jump to

Keyboard shortcuts

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