sdk

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoSDKModuleIDPath = "typedefs.json"
)
View Source
const (
	RuntimeWorkdirPath = "/scratch"
)

Variables

This section is empty.

Functions

func DecodeInitArgs

func DecodeInitArgs(raw core.JSON) (map[string]any, error)

func IsBuiltinSDKName

func IsBuiltinSDKName(source string) bool

IsBuiltinSDKName reports whether source names a built-in SDK/runtime bundled in the engine (e.g. "go", "python", "dang"), optionally with an "@version" suffix — as opposed to an external module ref or local path. Such names are resolved in-engine when a module's runtime loads; they are not standalone modules that can be loaded from a path or ref.

func IsModuleSDKBuiltin added in v0.18.19

func IsModuleSDKBuiltin(module string) bool

Return true if the given module is a builtin SDK.

func ScopeModuleForSDKOperation added in v0.21.0

func ScopeModuleForSDKOperation(
	ctx context.Context,
	mod *core.Module,
	op string,
	dag *dagql.Server,
) (inst dagql.ObjectResult[*core.Module], err error)

Types

type Loader

type Loader struct{}

func NewLoader

func NewLoader() *Loader

func (*Loader) SDKForModule

func (l *Loader) SDKForModule(
	ctx context.Context,
	query *core.Query,
	sdk *core.SDKConfig,
	parentSrc *core.ModuleSource,
) (_ core.SDK, rerr error)

SDKForModule loads an SDK module based on the given SDK configuration.

If it's a builtin SDK, it will load it from the engine container. Otherwise, it will load it from the given source either from a URL or from a local path.

type WorkspaceModule

type WorkspaceModule struct {
	Name   string
	Source string
}

WorkspaceModule describes the SDK module a workspace should install for a child module runtime.

func WorkspaceModuleForRuntime

func WorkspaceModuleForRuntime(runtime string) (WorkspaceModule, bool, error)

WorkspaceModuleForRuntime returns the workspace module that exposes a built-in runtime SDK. Unknown external SDK refs are intentionally left for the normal SDK loader and do not have a static workspace module mapping here.

Directories

Path Synopsis
dang
shared
Package dangshared holds the Dang-version-agnostic plumbing shared by every supported major version of the Dang runtime (core/sdk/dang/v1, v2, ...).
Package dangshared holds the Dang-version-agnostic plumbing shared by every supported major version of the Dang runtime (core/sdk/dang/v1, v2, ...).
v1
Package dangv1 evaluates Dagger modules written against Dang v1 (github.com/vito/dang: `.{ }` is selection, `.{{ }}` does not exist).
Package dangv1 evaluates Dagger modules written against Dang v1 (github.com/vito/dang: `.{ }` is selection, `.{{ }}` does not exist).
v2
Package dangv2 evaluates Dagger modules written against Dang v2 (github.com/vito/dang/v2: `.{ }` is dot-block application, `.{{ }}` is selection).
Package dangv2 evaluates Dagger modules written against Dang v2 (github.com/vito/dang/v2: `.{ }` is dot-block application, `.{{ }}` is selection).

Jump to

Keyboard shortcuts

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