Documentation ¶
Index ¶
- type Config
- type Core
- func (c *Core) AttachVolume(id types.VolumeID, extra map[string]string) (*types.Volume, error)
- func (c *Core) CreateVolume(id types.VolumeID) (*types.Volume, error)
- func (c *Core) DetachVolume(id types.VolumeID, extra map[string]string) (*types.Volume, error)
- func (c *Core) ExistVolume(id types.VolumeID) (bool, error)
- func (c *Core) GetVolume(id types.VolumeID) (*types.Volume, error)
- func (c *Core) GetVolumeDriver(id types.VolumeID) (*types.Volume, driver.Driver, error)
- func (c *Core) ListVolumeName(labels map[string]string) ([]string, error)
- func (c *Core) ListVolumes(labels map[string]string) ([]*types.Volume, error)
- func (c *Core) RemoveVolume(id types.VolumeID) error
- func (c *Core) VolumePath(id types.VolumeID) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Timeout time.Duration `json:"volume-timeout"` // operation timeout. RemoveVolume bool `json:"remove-volume"` // remove volume add data or volume's metadata when remove pouch volume. DefaultBackend string `json:"volume-default-driver"` // default volume backend. VolumeMetaPath string `json:"volume-meta-dir"` // volume metadata store path. DriverAlias string `json:"volume-driver-alias"` // driver alias configure. }
Config represents volume config struct.
type Core ¶
type Core struct { Config // contains filtered or unexported fields }
Core represents volume core struct.
func (*Core) AttachVolume ¶
AttachVolume to enable a volume on local host.
func (*Core) CreateVolume ¶
CreateVolume use to create a volume, if failed, will return error info.
func (*Core) DetachVolume ¶
DetachVolume to disable a volume on local host.
func (*Core) ExistVolume ¶
ExistVolume return 'true' if volume be found and not errors.
func (*Core) GetVolumeDriver ¶
GetVolumeDriver return the backend driver and volume with specified volume's id.
func (*Core) ListVolumeName ¶
ListVolumeName return the name of all volumes only. Param 'labels' use to filter the volume's names, only return those you want.
func (*Core) ListVolumes ¶
ListVolumes return all volumes. Param 'labels' use to filter the volumes, only return those you want.
func (*Core) RemoveVolume ¶
RemoveVolume remove volume from storage and meta information, if not success return error.