Documentation ¶
Index ¶
- Constants
- Variables
- func NewLocalVolumeDriver(js jsonstore.JsonStore) volume.Volume
- func NewNasVolumeDriver(js jsonstore.JsonStore) volume.Volume
- type LocalVolumeDriver
- func (d LocalVolumeDriver) Attach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.AttachCallback, error)
- func (d LocalVolumeDriver) Create(config volume.VolumeCreateConfig) (volume.VolumeInfo, error)
- func (d LocalVolumeDriver) Delete(ID volume.VolumeIdentity, force bool) error
- func (d LocalVolumeDriver) Info(ID volume.VolumeIdentity) (volume.VolumeInfo, error)
- func (d LocalVolumeDriver) Type() volume.VolumeType
- func (d LocalVolumeDriver) UnAttach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.VolumeInfo, error)
- type NasVolumeDriver
- func (d NasVolumeDriver) Attach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.AttachCallback, error)
- func (d NasVolumeDriver) Create(config volume.VolumeCreateConfig) (volume.VolumeInfo, error)
- func (d NasVolumeDriver) Delete(ID volume.VolumeIdentity, force bool) error
- func (d NasVolumeDriver) Info(ID volume.VolumeIdentity) (volume.VolumeInfo, error)
- func (d NasVolumeDriver) Type() volume.VolumeType
- func (d NasVolumeDriver) UnAttach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.VolumeInfo, error)
Constants ¶
View Source
const (
LocalVolumeHostPathPrefix = "/data/volumes"
)
View Source
const (
NasVolumeHostPathPrefix = "/netdata/volumes"
)
Variables ¶
View Source
var ( ExistedVolumeID = errors.New("Existed Volume ID") NotFoundVolume = errors.New("Not found volume") VolumeNameReferNilVolume = errors.New("volume name refer to nil volume") )
View Source
var ( BadVolumeTypeNotLocalVolume = errors.New("Bad VolumeType, not localvolume") BadAttachDest = errors.New("Bad Attach dest") MultiAttachWithLocalVolume = errors.New("multiple attach localvolume") )
View Source
var (
BadVolumeTypeNotNasVolume = errors.New("Bad VolumeType, not nasvolume")
)
Functions ¶
Types ¶
type LocalVolumeDriver ¶
type LocalVolumeDriver struct {
// contains filtered or unexported fields
}
func (LocalVolumeDriver) Attach ¶
func (d LocalVolumeDriver) Attach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.AttachCallback, error)
func (LocalVolumeDriver) Create ¶
func (d LocalVolumeDriver) Create(config volume.VolumeCreateConfig) (volume.VolumeInfo, error)
func (LocalVolumeDriver) Delete ¶
func (d LocalVolumeDriver) Delete(ID volume.VolumeIdentity, force bool) error
For localvolume, Delete does nothing, only clears the metadata. The specific cleanup work is implemented by the localvolume provided by the plugin. For example, for marathon, localpv is cleaned up by it
func (LocalVolumeDriver) Info ¶
func (d LocalVolumeDriver) Info(ID volume.VolumeIdentity) (volume.VolumeInfo, error)
func (LocalVolumeDriver) Type ¶
func (d LocalVolumeDriver) Type() volume.VolumeType
func (LocalVolumeDriver) UnAttach ¶
func (d LocalVolumeDriver) UnAttach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.VolumeInfo, error)
type NasVolumeDriver ¶
type NasVolumeDriver struct {
// contains filtered or unexported fields
}
func (NasVolumeDriver) Attach ¶
func (d NasVolumeDriver) Attach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.AttachCallback, error)
func (NasVolumeDriver) Create ¶
func (d NasVolumeDriver) Create(config volume.VolumeCreateConfig) (volume.VolumeInfo, error)
func (NasVolumeDriver) Delete ¶
func (d NasVolumeDriver) Delete(ID volume.VolumeIdentity, force bool) error
func (NasVolumeDriver) Info ¶
func (d NasVolumeDriver) Info(ID volume.VolumeIdentity) (volume.VolumeInfo, error)
func (NasVolumeDriver) Type ¶
func (d NasVolumeDriver) Type() volume.VolumeType
func (NasVolumeDriver) UnAttach ¶
func (d NasVolumeDriver) UnAttach(ID volume.VolumeIdentity, dst volume.AttachDest) (volume.VolumeInfo, error)
Click to show internal directories.
Click to hide internal directories.