interfaces

package
v0.0.0-...-bafb2d1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StatusSuccess returned when the operation succeeded
	StatusSuccess = "Success"
	// StatusFailure returned when the operation failed
	StatusFailure = "Failure"
	// StatusNotSupported returned when the operation is not supported
	StatusNotSupported = "Not supported"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CapabilitiesResponse

type CapabilitiesResponse struct {
	// Attach value is True/False (depending if the driver implements attach and detach)
	Attach          bool `json:"attach"`
	FSGroup         bool `json:"fsGroup"`
	SupportsMetrics bool `json:"supportsMetrics"`
}

CapabilitiesResponse represents a capabilities response of the init command

type FlexPlugin

type FlexPlugin interface {

	// Init method is to initialize the flexvolume, it is a no op right now
	Init() FlexVolumeResponse

	// Mount method allows to mount the volume/fileset to a given location for a pod
	Mount(mountRequest FlexVolumeMountRequest) FlexVolumeResponse

	// Unmount methods unmounts the volume/ fileset from the pod
	Unmount(unmountRequest FlexVolumeUnmountRequest) FlexVolumeResponse
}

FlexPlugin is a partial interface of the flexvolume volume plugin

type FlexVolumeMountRequest

type FlexVolumeMountRequest struct {
	// MountDir is the path where the volume should be mounted
	MountDir string `json:"mountDir"`
	// Opts are the plugin options
	Opts map[string]string `json:"opts"`
}

FlexVolumeMountRequest represents a mount request from the volume plugin

type FlexVolumeResponse

type FlexVolumeResponse struct {
	// Status should be either "Success", "Failure" or "Not supported".
	Status string `json:"status"`
	// Reason for success or failure.
	Message string `json:"message,omitempty"`
	// Capabilities used in Init responses
	Capabilities CapabilitiesResponse `json:"capabilities,omitempty"`
}

FlexVolumeResponse represents a response of the volume plugin

type FlexVolumeUnmountRequest

type FlexVolumeUnmountRequest struct {
	// MountDir is the path to the mountpoint of the volume to be unmounted
	MountDir string `json:"mountDir"`
}

FlexVolumeUnmountRequest represents an unmount request from the volume plugin

Jump to

Keyboard shortcuts

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