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 ¶
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 ¶
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 *tasksv1.Task) error
// Allows for reversal of provisioned resources
Detach(ctx context.Context, node *nodesv1.Node, ctr *tasksv1.Task) error
}
type DefaultAttacher ¶
type DefaultAttacher struct {
// contains filtered or unexported fields
}
func NewDefaultAttacher ¶
func NewDefaultAttacher(vc clientv1.ClientV1) *DefaultAttacher
NewDefaultAttacher returns a new default attacher
func (*DefaultAttacher) PrepareMounts ¶
func (a *DefaultAttacher) PrepareMounts(ctx context.Context, n *nodesv1.Node, ctr *tasksv1.Task) 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
Click to show internal directories.
Click to hide internal directories.