Documentation ¶
Index ¶
- Constants
- func RegisterControllerMode(f ControllerInitFunc)
- type Controller
- type ControllerConfig
- type ControllerFactory
- type ControllerInitFunc
- type MockController
- func (m MockController) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest, *corev1.PersistentVolume) (*csi.ControllerExpandVolumeResponse, error)
- func (m MockController) CreateVolume(context.Context, *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (m MockController) DeleteVolume(context.Context, *csi.DeleteVolumeRequest, *corev1.PersistentVolume) (*csi.DeleteVolumeResponse, error)
- func (m MockController) VolumeAs() string
- type MockErrorController
- func (m MockErrorController) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest, *corev1.PersistentVolume) (*csi.ControllerExpandVolumeResponse, error)
- func (m MockErrorController) CreateVolume(context.Context, *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (m MockErrorController) DeleteVolume(context.Context, *csi.DeleteVolumeRequest, *corev1.PersistentVolume) (*csi.DeleteVolumeResponse, error)
- func (m MockErrorController) VolumeAs() string
- type NodeConfig
Constants ¶
View Source
const MockVolumeAs = "Mock"
Variables ¶
This section is empty.
Functions ¶
func RegisterControllerMode ¶
func RegisterControllerMode(f ControllerInitFunc)
Types ¶
type Controller ¶
type Controller interface { VolumeAs() string CreateVolume(context.Context, *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) DeleteVolume(context.Context, *csi.DeleteVolumeRequest, *corev1.PersistentVolume) (*csi.DeleteVolumeResponse, error) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest, *corev1.PersistentVolume) (*csi.ControllerExpandVolumeResponse, error) }
type ControllerConfig ¶
type ControllerConfig struct { // cluster info Region string ClusterID string // subpath configs SkipSubpathCreation bool EnableSubpathFinalizer bool // check whether recycle bin enabled before subpath deletion EnableRecycleBinCheck bool // clients for kubernetes KubeClient kubernetes.Interface CNFSGetter cnfsv1beta1.CNFSGetter // clients for alibaba cloud NasClientFactory interfaces.NasClientFactoryInterface }
func GetControllerConfig ¶
func GetControllerConfig(meta *metadata.Metadata) (*ControllerConfig, error)
type ControllerFactory ¶
type ControllerFactory struct {
Modes map[string]Controller
}
func NewControllerFactory ¶
func NewControllerFactory(config *ControllerConfig, defaultVolumeAs string) (*ControllerFactory, error)
func (*ControllerFactory) VolumeAs ¶
func (fac *ControllerFactory) VolumeAs(what string) (Controller, error)
type ControllerInitFunc ¶
type ControllerInitFunc func(*ControllerConfig) (Controller, error)
type MockController ¶ added in v1.5.0
type MockController struct{}
func (MockController) ControllerExpandVolume ¶ added in v1.5.0
func (m MockController) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest, *corev1.PersistentVolume) (*csi.ControllerExpandVolumeResponse, error)
func (MockController) CreateVolume ¶ added in v1.5.0
func (m MockController) CreateVolume(context.Context, *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (MockController) DeleteVolume ¶ added in v1.5.0
func (m MockController) DeleteVolume(context.Context, *csi.DeleteVolumeRequest, *corev1.PersistentVolume) (*csi.DeleteVolumeResponse, error)
func (MockController) VolumeAs ¶ added in v1.5.0
func (m MockController) VolumeAs() string
type MockErrorController ¶ added in v1.5.0
type MockErrorController struct{}
func (MockErrorController) ControllerExpandVolume ¶ added in v1.5.0
func (m MockErrorController) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest, *corev1.PersistentVolume) (*csi.ControllerExpandVolumeResponse, error)
func (MockErrorController) CreateVolume ¶ added in v1.5.0
func (m MockErrorController) CreateVolume(context.Context, *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (MockErrorController) DeleteVolume ¶ added in v1.5.0
func (m MockErrorController) DeleteVolume(context.Context, *csi.DeleteVolumeRequest, *corev1.PersistentVolume) (*csi.DeleteVolumeResponse, error)
func (MockErrorController) VolumeAs ¶ added in v1.5.0
func (m MockErrorController) VolumeAs() string
type NodeConfig ¶
type NodeConfig struct { NodeName string NodeIP string EnableEFCCache bool EnableMixRuntime bool EnablePortCheck bool EnableLosetup bool EnableVolumeStats bool // clients for kubernetes KubeClient kubernetes.Interface CNFSGetter cnfsv1beta1.CNFSGetter }
func GetNodeConfig ¶
func GetNodeConfig() (*NodeConfig, error)
Click to show internal directories.
Click to hide internal directories.