internal

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MockVolumeAs = "Mock"

Variables

This section is empty.

Functions

func RegisterControllerMode

func RegisterControllerMode(f ControllerInitFunc)

Types

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) CreateVolume added in v1.5.0

func (MockController) DeleteVolume added in v1.5.0

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) CreateVolume added in v1.5.0

func (MockErrorController) DeleteVolume added in v1.5.0

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)

Jump to

Keyboard shortcuts

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