volume

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeConditionHealthy  = "VolumeConditionHealthy"
	VolumeConditionAbnormal = "VolumeConditionAbnormal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CSIVolume

type CSIVolume interface {
	// GetDriver returns the name of the CSI-driver that is responsible
	// for this volume.
	GetDriver() string
	// GetVolumeID returns the ID (volume-handle) of the volume.
	GetVolumeID() string
}

CSIVolume describes an attached volume.

func NewCSIVolume

func NewCSIVolume(drivername, volumeID string) CSIVolume

NewCSIVolume creates a new CSIVolume with the given drivername and volumeID.

type Driver

type Driver interface {
	// GetDrivername returns the name of the CSI-driver.
	GetDrivername() string
	// SupportsVolumeCondition can be used to check if the CSI-driver
	// supports reporting the VolumeCondition (if the node has the
	// VOLUME_CONDITION capability).
	SupportsVolumeCondition() bool
	// GetVolumeCondition requests the VolumeCondition from the
	// CSI-driver.
	GetVolumeCondition(CSIVolume) (VolumeCondition, error)
}

Driver provides the API for communicating with a CSI-driver.

func FindDriver

func FindDriver(ctx context.Context, name string) (Driver, error)

FindDriver tries to connect to the CSI-driver with the given name. If a connection is made, it verifies the identity of the driver and its capabilities.

type VolumeCondition

type VolumeCondition interface {
	IsHealthy() bool
	GetReason() string
	GetMessage() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL