Documentation ¶
Index ¶
- Constants
- Variables
- type COWStrategy
- type Driver
- type EmptyStrategy
- type Filesystem
- type FilesystemInitVolume
- type FilesystemLiveVolume
- type FilesystemVolume
- type ImportStrategy
- type LockManager
- type Metadata
- type Promise
- type PromiseList
- type Properties
- type Repository
- type Strategerizer
- type Strategy
- type Streamer
- type Volume
- type VolumeState
- type Volumes
Constants ¶
View Source
const ( StrategyEmpty = "empty" StrategyCopyOnWrite = "cow" StrategyImport = "import" )
View Source
const GzipEncoding string = "gzip"
View Source
const ZstdEncoding string = "zstd"
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 ErrUnsupportedStreamEncoding = errors.New("unsupported stream encoding")
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, streamer Streamer) (FilesystemInitVolume, error)
type EmptyStrategy ¶
type EmptyStrategy struct{}
func (EmptyStrategy) Materialize ¶
func (EmptyStrategy) Materialize(logger lager.Logger, handle string, fs Filesystem, streamer Streamer) (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 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, streamer Streamer) (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(ctx context.Context, queryProperties Properties) (Volumes, []string, error) GetVolume(ctx context.Context, handle string) (Volume, bool, error) CreateVolume(ctx context.Context, handle string, strategy Strategy, properties Properties, isPrivileged bool) (Volume, error) DestroyVolume(ctx context.Context, handle string) error DestroyVolumeAndDescendants(ctx context.Context, handle string) error SetProperty(ctx context.Context, handle string, propertyName string, propertyValue string) error GetPrivileged(ctx context.Context, handle string) (bool, error) SetPrivileged(ctx context.Context, handle string, privileged bool) error StreamIn(ctx context.Context, handle string, path string, encoding string, stream io.Reader) (bool, error) StreamOut(ctx context.Context, handle string, path string, encoding string, dest io.Writer) error VolumeParent(ctx context.Context, handle string) (Volume, bool, error) }
func NewRepository ¶
func NewRepository( 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, Streamer) (FilesystemInitVolume, error)
}
type Volume ¶
type Volume struct { Handle string `json:"handle"` Path string `json:"path"` Properties Properties `json:"properties"` Privileged bool `json:"privileged"` }
type VolumeState ¶
type VolumeState string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.