Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + const ETCDVolumeMetadataDir + var IDLen int + var IDLenLock sync.Once + func DecodeVolumeType(s string) (apistructs.VolumeType, error) + func EncodeVolumeType(t VolumeType) (string, error) + type AttachCallback func(runtime *apistructs.ServiceGroup) (VolumeInfo, error) + type AttachDest apistructs.AttachDest + func (d AttachDest) Equal(d2 AttachDest) bool + func (d AttachDest) String() string + func (d AttachDest) Validate() error + type GC interface + type Volume interface + Attach func(ID VolumeIdentity, dst AttachDest) (AttachCallback, error) + Create func(config VolumeCreateConfig) (VolumeInfo, error) + Delete func(ID VolumeIdentity, force bool) error + Info func(ID VolumeIdentity) (VolumeInfo, error) + Type func() VolumeType + UnAttach func(ID VolumeIdentity, dst AttachDest) (VolumeInfo, error) + func GetDriver(drivers map[VolumeType]Volume, ID VolumeIdentity) (Volume, error) + func NewVolumeImpl(drivers map[apistructs.VolumeType]Volume) Volume + type VolumeCreateConfig struct + Size int + Type VolumeType + func VolumeCreateConfigFrom(r apistructs.VolumeCreateRequest) (VolumeCreateConfig, error) + func (c VolumeCreateConfig) String() string + type VolumeIdentity string + func NewVolumeID(config VolumeCreateConfig) (VolumeIdentity, error) + func NewVolumeName(name string) VolumeIdentity + func (i VolumeIdentity) IsNotUUID() bool + func (i VolumeIdentity) String() string + type VolumeImpl struct + func (VolumeImpl) Type() VolumeType + func (i VolumeImpl) Attach(ID VolumeIdentity, dst AttachDest) (AttachCallback, error) + func (i VolumeImpl) Create(config VolumeCreateConfig) (VolumeInfo, error) + func (i VolumeImpl) Delete(ID VolumeIdentity, force bool) error + func (i VolumeImpl) Info(ID VolumeIdentity) (VolumeInfo, error) + func (i VolumeImpl) UnAttach(ID VolumeIdentity, dst AttachDest) (VolumeInfo, error) + type VolumeInfo = apistructs.VolumeInfo + type VolumeReference = apistructs.VolumeReference + type VolumeType = apistructs.VolumeType