Documentation ¶
Index ¶
- func ListCommonOptions() map[string]types.Option
- 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) 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) 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 ¶
func ListCommonOptions ¶
ListCommonOptions returns common options.
Types ¶
type Config ¶
type Config struct { ControlAddress string Timeout time.Duration // operation timeout. RemoveVolume bool DefaultBackend string VolumeMetaPath string }
Config represents volume config struct.
type Core ¶
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) RemoveVolume ¶
RemoveVolume remove volume from storage and meta information, if not success return error.
Click to show internal directories.
Click to hide internal directories.