loading

package
v0.0.0-...-889047d Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DynamicLoadfunc

func DynamicLoadfunc() starlarkhelpers.Function

func FromFile

func FromFile(ctx context.Context, fpath string, src interface{}, load starlarkhelpers.LoaderFunc) error

Types

type Loader

type Loader struct {
	// Predeclared is used for builtin modules which are not loaded from a path.
	Predeclared func(module string) (starlark.StringDict, error)

	// WorkspacePath specifies the path to the source directory.
	WorkspacePath string
}

Loader handles module loading for starlark modules.

func DefaultLoader

func DefaultLoader(ctx context.Context, fsys afero.Fs, executor shell.Executor, workspacePath string) Loader

func (*Loader) Sequential

func (l *Loader) Sequential(ctx context.Context) func(thread *starlark.Thread, module string) (starlark.StringDict, error)

Sequential implements sequential module loading. Module paths starting with "//" will be loaded from WorkspacePath, which should be the mount path to the workspace source directory.

Jump to

Keyboard shortcuts

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