Documentation ¶
Index ¶
- func NewFakeDriver(name string) volume.Driver
- func NewFakeVolume(name string, driverName string) volume.Volume
- type FakeDriver
- func (d *FakeDriver) Create(name string, opts map[string]string) (volume.Volume, error)
- func (d *FakeDriver) Get(name string) (volume.Volume, error)
- func (d *FakeDriver) List() ([]volume.Volume, error)
- func (d *FakeDriver) Name() string
- func (d *FakeDriver) Remove(v volume.Volume) error
- func (*FakeDriver) Scope() string
- type FakeVolume
- type NoopVolume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeDriver ¶ added in v1.10.0
NewFakeDriver creates a new FakeDriver with the specified name
Types ¶
type FakeDriver ¶
type FakeDriver struct {
// contains filtered or unexported fields
}
FakeDriver is a driver that generates fake volumes
func (*FakeDriver) Create ¶
Create initializes a fake volume. It returns an error if the options include an "error" key with a message
func (*FakeDriver) Get ¶ added in v1.10.0
func (d *FakeDriver) Get(name string) (volume.Volume, error)
Get gets the volume
func (*FakeDriver) List ¶ added in v1.10.0
func (d *FakeDriver) List() ([]volume.Volume, error)
List lists the volumes
func (*FakeDriver) Remove ¶
func (d *FakeDriver) Remove(v volume.Volume) error
Remove deletes a volume.
func (*FakeDriver) Scope ¶ added in v1.12.0
func (*FakeDriver) Scope() string
Scope returns the local scope
type FakeVolume ¶
type FakeVolume struct {
// contains filtered or unexported fields
}
FakeVolume is a fake volume with a random name
func (FakeVolume) CreatedAt ¶
func (FakeVolume) CreatedAt() (time.Time, error)
CreatedAt provides the time the volume (directory) was created at
func (FakeVolume) DriverName ¶
func (f FakeVolume) DriverName() string
DriverName is the name of the driver
func (FakeVolume) Mount ¶
func (FakeVolume) Mount(_ string) (string, error)
Mount mounts the volume in the container
func (FakeVolume) Status ¶ added in v1.12.0
func (FakeVolume) Status() map[string]interface{}
Status provides low-level details about the volume
func (FakeVolume) Unmount ¶
func (FakeVolume) Unmount(_ string) error
Unmount unmounts the volume from the container
type NoopVolume ¶
type NoopVolume struct{}
NoopVolume is a volume that doesn't perform any operation
func (NoopVolume) CreatedAt ¶
func (NoopVolume) CreatedAt() (time.Time, error)
CreatedAt provides the time the volume (directory) was created at
func (NoopVolume) DriverName ¶
func (NoopVolume) DriverName() string
DriverName is the name of the driver
func (NoopVolume) Mount ¶
func (NoopVolume) Mount(_ string) (string, error)
Mount mounts the volume in the container
func (NoopVolume) Status ¶ added in v1.12.0
func (NoopVolume) Status() map[string]interface{}
Status provides low-level details about the volume
func (NoopVolume) Unmount ¶
func (NoopVolume) Unmount(_ string) error
Unmount unmounts the volume from the container