Documentation
¶
Overview ¶
Package volume provides an API for working with volumes on nodes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NodeVolumeDrivers ¶ added in v0.0.7
NodeVolumeDrivers returns a list of drivers, each configured according to the provided Node spec. If no drivers are configured on the node then the list will be empty
Types ¶
type Attacher ¶ added in v0.0.7
type Attacher interface {
// PrepareMounts inspects ctr.Config.Mounts, resolves any mount.Volume
// to a local host path using the appropriate Driver, and updates the
// mounts with mount.Source = host path.
PrepareMounts(ctx context.Context, node *nodesv1.Node, ctr *containersv1.Container) error
// Allows for reversal of provisioned resources
Detach(ctx context.Context, node *nodesv1.Node, ctr *containersv1.Container) error
}
type DefaultAttacher ¶ added in v0.0.7
type DefaultAttacher struct {
// contains filtered or unexported fields
}
func NewDefaultAttacher ¶ added in v0.0.7
func NewDefaultAttacher(vc clientv1.ClientV1) *DefaultAttacher
NewDefaultAttacher returns a new default attacher
func (*DefaultAttacher) Detach ¶ added in v0.0.7
func (a *DefaultAttacher) Detach(ctx context.Context, n *nodesv1.Node, ctr *containersv1.Container) error
Detach implements Attacher interface
func (*DefaultAttacher) PrepareMounts ¶ added in v0.0.7
func (a *DefaultAttacher) PrepareMounts(ctx context.Context, n *nodesv1.Node, ctr *containersv1.Container) error
PrepareMounts implements Attacher interface
type Driver ¶
type Driver interface {
// Create creates a new volume
Create(ctx context.Context, name string) (Volume, error)
// Get gets a volume by name
Get(ctx context.Context, name string) (Volume, error)
// Delete removes a volume. The volume must be unmounted before removal
Delete(ctx context.Context, name string) error
// List lists all valumes managed by the driver
List(context.Context) ([]Volume, error)
}
func NewHostLocalManager ¶
type DriverType ¶
type DriverType int32
const ( DriverTypeUnspecified DriverType = 0 DriverTypeHostLocal DriverType = 1 DriverTypeTemplate DriverType = 2 )
func GetDriverType ¶
func GetDriverType(vol *volumesv1.Volume) DriverType
func (DriverType) String ¶
func (d DriverType) String() string
type Snapshotter ¶ added in v0.0.7
Click to show internal directories.
Click to hide internal directories.