volumes

package
v11.11.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheVolumesDisabled = errors.New("cache volumes feature disabled")

Functions

func IsHostMountedVolume

func IsHostMountedVolume(volumeParser parser.Parser, dir string, volumes ...string) (bool, error)

Types

type CacheContainersManager

type CacheContainersManager interface {
	FindOrCleanExisting(containerName string, containerPath string) string
	Create(containerName string, containerPath string) (string, error)
	Cleanup(ctx context.Context, ids []string) chan bool
}

func NewCacheContainerManager

func NewCacheContainerManager(ctx context.Context, logger debugLogger, cClient containerClient, helperImage *types.ImageInspect, outdatedHelperImage bool) CacheContainersManager

type ErrVolumeAlreadyDefined

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

func NewErrVolumeAlreadyDefined

func NewErrVolumeAlreadyDefined(containerPath string) *ErrVolumeAlreadyDefined

func (*ErrVolumeAlreadyDefined) Error

func (e *ErrVolumeAlreadyDefined) Error() string

type Manager

type Manager interface {
	Create(volume string) error
	CreateTemporary(containerPath string) error
	Binds() []string
	ContainerIDs() []string
	Cleanup(ctx context.Context) chan bool
}

func NewManager

func NewManager(logger debugLogger, volumeParser parser.Parser, ccManager CacheContainersManager, config ManagerConfig) Manager

type ManagerConfig

type ManagerConfig struct {
	CacheDir          string
	BaseContainerPath string
	UniqueName        string
	DisableCache      bool
}

type MockCacheContainersManager

type MockCacheContainersManager struct {
	mock.Mock
}

MockCacheContainersManager is an autogenerated mock type for the CacheContainersManager type

func (*MockCacheContainersManager) Cleanup

func (_m *MockCacheContainersManager) Cleanup(ctx context.Context, ids []string) chan bool

Cleanup provides a mock function with given fields: ctx, ids

func (*MockCacheContainersManager) Create

func (_m *MockCacheContainersManager) Create(containerName string, containerPath string) (string, error)

Create provides a mock function with given fields: containerName, containerPath

func (*MockCacheContainersManager) FindOrCleanExisting

func (_m *MockCacheContainersManager) FindOrCleanExisting(containerName string, containerPath string) string

FindOrCleanExisting provides a mock function with given fields: containerName, containerPath

type MockManager

type MockManager struct {
	mock.Mock
}

MockManager is an autogenerated mock type for the Manager type

func (*MockManager) Binds

func (_m *MockManager) Binds() []string

Binds provides a mock function with given fields:

func (*MockManager) Cleanup

func (_m *MockManager) Cleanup(ctx context.Context) chan bool

Cleanup provides a mock function with given fields: ctx

func (*MockManager) ContainerIDs

func (_m *MockManager) ContainerIDs() []string

ContainerIDs provides a mock function with given fields:

func (*MockManager) Create

func (_m *MockManager) Create(volume string) error

Create provides a mock function with given fields: volume

func (*MockManager) CreateTemporary

func (_m *MockManager) CreateTemporary(containerPath string) error

CreateTemporary provides a mock function with given fields: containerPath

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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