plugin

package
v2.0.0-...-c1c857e Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TargetStagePath is the path within the plugin's scope that the volume is
	// to be staged. This does not need to be accessible or propagated outside
	// of the plugin rootfs.
	TargetStagePath string = "/data/staged"
	// TargetPublishPath is the path within the plugin's scope that the volume
	// is to be published. This needs to be the plugin's PropagatedMount.
	TargetPublishPath string = "/data/published"
)
View Source
const (
	// DockerCSIPluginCap is the capability name of the plugins we use with the
	// PluginGetter to get only the plugins we need. The full name of the
	// plugin interface is "docker.csinode/1.0". This gets only plugins with
	// Node capabilities.
	DockerCSIPluginCap = "csinode"
)

Variables

View Source
var NewPluginManager = NewManager

Deprecated: use NewManager.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Get gets the plugin with the given name
	Get(name string) (NodePlugin, error)

	// NodeInfo returns the NodeCSIInfo for every active plugin.
	NodeInfo(ctx context.Context) ([]*api.NodeCSIInfo, error)
}

Manager manages the multiple CSI plugins that may be in use on the node. Manager should be thread-safe.

func NewManager

func NewManager(pg plugin.Getter, secrets SecretGetter) Manager

type NodePlugin

type NodePlugin interface {
	GetPublishedPath(volumeID string) string
	NodeGetInfo(ctx context.Context) (*api.NodeCSIInfo, error)
	NodeStageVolume(ctx context.Context, req *api.VolumeAssignment) error
	NodeUnstageVolume(ctx context.Context, req *api.VolumeAssignment) error
	NodePublishVolume(ctx context.Context, req *api.VolumeAssignment) error
	NodeUnpublishVolume(ctx context.Context, req *api.VolumeAssignment) error
}

func NewNodePlugin

func NewNodePlugin(name string, p plugin.AddrPlugin, secrets SecretGetter) NodePlugin

type PluginManager deprecated

type PluginManager = Manager

Deprecated: use Manager.

type SecretGetter

type SecretGetter interface {
	Get(secretID string) (*api.Secret, error)
}

SecretGetter is a reimplementation of the exec.SecretGetter interface in the scope of the plugin package. This avoids the needing to import exec into the plugin package.

Jump to

Keyboard shortcuts

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