Documentation ¶
Index ¶
- type Config
- type Core
- func (c *Core) AttachVolume(ctx context.Context, id types.VolumeContext, extra map[string]string) (*types.Volume, error)
- func (c *Core) CreateVolume(ctx context.Context, id types.VolumeContext) (*types.Volume, error)
- func (c *Core) DetachVolume(ctx context.Context, id types.VolumeContext, extra map[string]string) (*types.Volume, error)
- func (c *Core) GetVolume(ctx context.Context, id types.VolumeContext) (*types.Volume, error)
- func (c *Core) ListVolumeName(ctx context.Context, filter filters.Args) ([]string, error)
- func (c *Core) ListVolumes(ctx context.Context, filter filters.Args) ([]*types.Volume, error)
- func (c *Core) RemoveVolume(ctx context.Context, id types.VolumeContext) error
- func (c *Core) VolumePath(ctx context.Context, id types.VolumeContext) (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,omitempty"` // operation timeout. RemoveVolume bool `json:"remove-volume,omitempty"` // remove volume add data or volume's metadata when remove pouch volume. DefaultBackend string `json:"volume-default-driver,omitempty"` // default volume backend. VolumeMetaPath string `json:"volume-meta-dir,omitempty"` // volume metadata store path. DriverAlias string `json:"volume-driver-alias,omitempty"` // 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 ¶
func (c *Core) AttachVolume(ctx context.Context, id types.VolumeContext, extra map[string]string) (*types.Volume, error)
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 ¶
func (c *Core) DetachVolume(ctx context.Context, id types.VolumeContext, extra map[string]string) (*types.Volume, error)
DetachVolume to disable a volume on local host.
func (*Core) ListVolumeName ¶
ListVolumeName return the name of all volumes only. Param 'filter' use to filter the volume's names, only return those you want.
func (*Core) ListVolumes ¶
ListVolumes return all volumes. Param 'filter' 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.
func (*Core) VolumePath ¶
VolumePath return the path of volume on node host.
Click to show internal directories.
Click to hide internal directories.