Documentation ¶
Index ¶
- Constants
- Variables
- type COWStrategy
- type Driver
- type EmptyStrategy
- type Filesystem
- type FilesystemInitVolume
- type FilesystemLiveVolume
- type FilesystemVolume
- type ImportStrategy
- type LockManager
- type Metadata
- func (md *Metadata) ExpiresAt() (time.Time, error)
- func (md *Metadata) IsPrivileged() (bool, error)
- func (md *Metadata) Properties() (Properties, error)
- func (md *Metadata) StorePrivileged(isPrivileged bool) error
- func (md *Metadata) StoreProperties(properties Properties) error
- func (md *Metadata) StoreTTL(ttl TTL) (time.Time, error)
- func (md *Metadata) TTL() (TTL, time.Time, error)
- type Promise
- type PromiseList
- type Properties
- type Repository
- type Strategerizer
- type Strategy
- type TTL
- type Volume
- type VolumeState
- type Volumes
Constants ¶
View Source
const ( StrategyEmpty = "empty" StrategyCopyOnWrite = "cow" StrategyImport = "import" )
Variables ¶
View Source
var ErrNoParentVolumeProvided = errors.New("no parent volume provided")
View Source
var ErrNoStrategy = errors.New("no strategy given")
View Source
var ErrParentVolumeNotFound = errors.New("parent volume not found")
View Source
var ErrPromiseAlreadyExists = errors.New("promise already exists in list")
View Source
var ErrPromiseCanceled = errors.New("promise was canceled")
View Source
var ErrPromiseNotPending = errors.New("promise is not pending")
View Source
var ErrPromiseStillPending = errors.New("promise is still pending")
View Source
var ErrUnknownStrategy = errors.New("unknown strategy")
View Source
var ErrVolumeDoesNotExist = errors.New("volume does not exist")
View Source
var ErrVolumeIsCorrupted = errors.New("volume is corrupted")
Functions ¶
This section is empty.
Types ¶
type COWStrategy ¶
type COWStrategy struct {
ParentHandle string
}
func (COWStrategy) Materialize ¶
func (strategy COWStrategy) Materialize(logger lager.Logger, handle string, fs Filesystem) (FilesystemInitVolume, error)
type EmptyStrategy ¶
type EmptyStrategy struct{}
func (EmptyStrategy) Materialize ¶
func (EmptyStrategy) Materialize(logger lager.Logger, handle string, fs Filesystem) (FilesystemInitVolume, error)
type Filesystem ¶
type Filesystem interface { NewVolume(string) (FilesystemInitVolume, error) LookupVolume(string) (FilesystemLiveVolume, bool, error) ListVolumes() ([]FilesystemLiveVolume, error) }
func NewFilesystem ¶
func NewFilesystem(driver Driver, parentDir string) (Filesystem, error)
type FilesystemInitVolume ¶
type FilesystemInitVolume interface { FilesystemVolume Initialize() (FilesystemLiveVolume, error) }
type FilesystemLiveVolume ¶
type FilesystemLiveVolume interface { FilesystemVolume NewSubvolume(handle string) (FilesystemInitVolume, error) }
type FilesystemVolume ¶
type FilesystemVolume interface { Handle() string DataPath() string LoadProperties() (Properties, error) StoreProperties(Properties) error LoadTTL() (TTL, time.Time, error) StoreTTL(TTL) (time.Time, error) LoadPrivileged() (bool, error) StorePrivileged(bool) error Parent() (FilesystemLiveVolume, bool, error) Destroy() error }
FilesystemVolume represents the state of a volume's data and metadata.
Operations will return ErrVolumeDoesNotExist if the data on disk has disappeared.
type ImportStrategy ¶
func (ImportStrategy) Materialize ¶
func (strategy ImportStrategy) Materialize(logger lager.Logger, handle string, fs Filesystem) (FilesystemInitVolume, error)
type LockManager ¶
func NewLockManager ¶
func NewLockManager() LockManager
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func (*Metadata) IsPrivileged ¶
func (*Metadata) StorePrivileged ¶
func (*Metadata) StoreProperties ¶
func (md *Metadata) StoreProperties(properties Properties) error
type Promise ¶
type Promise interface { IsPending() bool GetValue() (Volume, error, error) Fulfill(Volume) error Reject(error) error }
func NewPromise ¶
func NewPromise() Promise
type PromiseList ¶
type PromiseList interface { AddPromise(handle string, promise Promise) error GetPromise(handle string) Promise RemovePromise(handle string) }
func NewPromiseList ¶
func NewPromiseList() PromiseList
type Properties ¶
func (Properties) HasProperties ¶
func (p Properties) HasProperties(other Properties) bool
func (Properties) UpdateProperty ¶
func (p Properties) UpdateProperty(name string, value string) Properties
type Repository ¶
type Repository interface { ListVolumes(queryProperties Properties) (Volumes, []string, error) GetVolume(handle string) (Volume, bool, error) CreateVolume(handle string, strategy Strategy, properties Properties, ttlInSeconds uint, isPrivileged bool) (Volume, error) DestroyVolume(handle string) error DestroyVolumeAndDescendants(handle string) error SetProperty(handle string, propertyName string, propertyValue string) error SetTTL(handle string, ttl uint) error SetPrivileged(handle string, privileged bool) error StreamIn(handle string, path string, stream io.Reader) (bool, error) StreamOut(handle string, path string, dest io.Writer) error VolumeParent(handle string) (Volume, bool, error) }
func NewRepository ¶
func NewRepository( logger lager.Logger, filesystem Filesystem, locker LockManager, privilegedNamespacer uidgid.Namespacer, unprivilegedNamespacer uidgid.Namespacer, ) Repository
type Strategerizer ¶
type Strategerizer interface {
StrategyFor(baggageclaim.VolumeRequest) (Strategy, error)
}
func NewStrategerizer ¶
func NewStrategerizer() Strategerizer
type Strategy ¶
type Strategy interface {
Materialize(lager.Logger, string, Filesystem) (FilesystemInitVolume, error)
}
type VolumeState ¶
type VolumeState string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.