package plugin
import "github.com/moby/swarmkit/v2/agent/csi/plugin"
Index ¶
Constants ¶
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" )
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 ¶
var NewPluginManager = NewManager
Deprecated: use NewManager.
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 ¶
type PluginManager = Manager
Deprecated: use Manager.
type SecretGetter ¶
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.
Source Files ¶
manager.go manager_deprecated.go plugin.go
- Version
- v2.0.0-20250103191802-8c1959736554 (latest)
- Published
- Jan 3, 2025
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 1 week ago –
Tools for package owners.