csivolumes

package
v1.2.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodNameContextKey = "csi.storage.k8s.io/pod.name"

	// CSIVolumeAttributeModeField used for identifying the origin of the NodePublishVolume request
	CSIVolumeAttributeModeField     = "mode"
	CSIVolumeAttributeDynakubeField = "dynakube"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher interface {
	PublishVolume(ctx context.Context, volumeCfg VolumeConfig) (*csi.NodePublishVolumeResponse, error)
	UnpublishVolume(ctx context.Context, volumeInfo VolumeInfo) (*csi.NodeUnpublishVolumeResponse, error)
	CanUnpublishVolume(ctx context.Context, volumeInfo VolumeInfo) (bool, error)
}

type VolumeConfig

type VolumeConfig struct {
	VolumeInfo
	PodName      string
	Mode         string
	DynakubeName string
}

Represents the config needed to mount a volume

func ParseNodePublishVolumeRequest

func ParseNodePublishVolumeRequest(req *csi.NodePublishVolumeRequest) (*VolumeConfig, error)

Transforms the NodePublishVolumeRequest into a VolumeConfig

type VolumeInfo

type VolumeInfo struct {
	VolumeID   string
	TargetPath string
}

Represents the basic information about a volume

func ParseNodeUnpublishVolumeRequest

func ParseNodeUnpublishVolumeRequest(req *csi.NodeUnpublishVolumeRequest) (*VolumeInfo, error)

Transforms the NodeUnpublishVolumeRequest into a VolumeInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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