loader

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFileWrongExtension is returned when a file has an unexpected extension for a batch hook
	ErrFileWrongExtension = errors.New("file has wrong extension")
	// ErrFileNotBatchHook is returned when a file doesn't respond correctly to "hook list"
	ErrFileNotBatchHook = errors.New("file is not batch hook")
	// ErrFileNotExecutable is returned when a hook file lacks executable permissions
	ErrFileNotExecutable = errors.New("no executable permissions, chmod +x is required to run this hook")
)
View Source
var (
	// ErrPackageNotFound is returned when the requested package directory doesn't exist
	ErrPackageNotFound = errors.New("package not found")
)

Functions

func LoadAppConf

func LoadAppConf(ctx context.Context, appDir string, logger *log.Logger) (*apps.Config, error)

LoadAppConf loads an application package from the given directory on the filesystem. The directory name must follow the "namespace.name" convention (e.g., "default.my-app").

Steps:

  1. Validates the package directory exists
  2. Loads the package definition (package.yaml)
  3. Loads values (static values.yaml and OpenAPI schemas)
  4. Extracts namespace and name from the directory basename
  5. Discovers and loads batch hooks
  6. Loads image digests (images_digests.json)

Returns ErrPackageNotFound if the directory doesn't exist.

func LoadEmbeddedConf added in v1.76.0

func LoadEmbeddedConf(ctx context.Context, moduleDir string, logger *log.Logger) (*modules.Config, error)

LoadEmbeddedConf loads a module config from an embedded (built-in) module directory. Unlike LoadModuleConf, it does not resolve version by symlinks.

func LoadGlobalConf added in v1.76.0

func LoadGlobalConf(ctx context.Context, logger *log.Logger) (*global.Config, error)

LoadGlobalConf loads the global module configuration from the globalPath directory. Unlike app and module loading, global hooks come from the compiled-in Go SDK registry, not from the filesystem. Only values and OpenAPI schemas are read from disk.

Returns ErrPackageNotFound if the global-hooks directory doesn't exist.

func LoadModuleConf

func LoadModuleConf(ctx context.Context, moduleDir string, logger *log.Logger) (*modules.Config, error)

LoadModuleConf loads a module package from the given directory on the filesystem.

Steps:

  1. Validates the module directory exists
  2. Loads the package definition (package.yaml, falling back to module.yaml)
  3. Loads values (static values.yaml and OpenAPI schemas)
  4. Discovers and loads batch hooks
  5. Loads image digests (images_digests.json)

Returns ErrPackageNotFound if the directory doesn't exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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