moduleloader

package
v1.69.14 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrModuleIsNotFound = errors.New("module is not found")
)

Functions

This section is empty.

Types

type Loader

type Loader struct {
	// contains filtered or unexported fields
}

func New

func New(client client.Client, version, modulesDir, globalDir string, dc dependency.Container, embeddedPolicy *helpers.ModuleUpdatePolicySpecContainer, logger *log.Logger) *Loader

func (*Loader) GetModuleByName

func (l *Loader) GetModuleByName(name string) (*moduletypes.Module, error)

func (*Loader) LoadModule

func (l *Loader) LoadModule(_, modulePath string) (*modules.BasicModule, error)

LoadModule implements the module loader interface from addon-operator, it reads single directory and returns BasicModule modulePath is in the following format: /deckhouse-controller/downloaded/<module_name>/<module_version>

func (*Loader) LoadModules

func (l *Loader) LoadModules() ([]*modules.BasicModule, error)

LoadModules implements the module loader interface from addon-operator, used for registering modules in addon-operator

func (*Loader) LoadModulesFromFS

func (l *Loader) LoadModulesFromFS(ctx context.Context) error

LoadModulesFromFS parses and ensures modules from FS

func (*Loader) Sync

func (l *Loader) Sync(ctx context.Context) error

Sync syncs fs and cluster, restores or deletes modules

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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