Documentation
¶
Index ¶
- Constants
- func DecodeInitArgs(raw core.JSON) (map[string]any, error)
- func GeneratorMergesOwnTypes(sdkSource string) bool
- func HasInitializer(sdkMod *core.Module) bool
- func IsBuiltinSDKName(source string) bool
- func IsModuleSDKBuiltin(module string) bool
- func ScopeModuleForSDKOperation(ctx context.Context, mod *core.Module, op string, dag *dagql.Server) (inst dagql.ObjectResult[*core.Module], err error)
- type Loader
- type WorkspaceModule
Constants ¶
const (
RuntimeWorkdirPath = "/scratch"
)
Variables ¶
This section is empty.
Functions ¶
func GeneratorMergesOwnTypes ¶
GeneratorMergesOwnTypes reports whether the SDK's generator writes a module's own types into its bindings by itself, so the module must not also be one of its own dependencies: the generator refuses a dependency named after the module.
func HasInitializer ¶
HasInitializer reports whether a module implements either SDK initializer.
func IsBuiltinSDKName ¶
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
Return true if the given module is a builtin SDK.
Types ¶
type Loader ¶
type Loader struct{}
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 ¶
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.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
dang
|
|
|
shared
Package dangshared holds the plumbing of the Dang SDK that does not depend on the Dang library (core/sdk/dang/v2): the nested-client server, client metadata, error conversion and naming.
|
Package dangshared holds the plumbing of the Dang SDK that does not depend on the Dang library (core/sdk/dang/v2): the nested-client server, client metadata, error conversion and naming. |
|
v2
Package dangv2 evaluates Dagger modules written in Dang with the github.com/vito/dang/v2 library, which parses every Dang language version since 1.0: each module's source is parsed as the version it is written in (ModuleSource.DangVersion).
|
Package dangv2 evaluates Dagger modules written in Dang with the github.com/vito/dang/v2 library, which parses every Dang language version since 1.0: each module's source is parsed as the version it is written in (ModuleSource.DangVersion). |
|
Package entrypoint holds the parts of module entrypoint loading that every entrypoint driver shares: resolving entrypoint.source to a module source, encoding the arguments of the ModuleEntrypoint interface, and turning the type definitions an entrypoint returns into a module.
|
Package entrypoint holds the parts of module entrypoint loading that every entrypoint driver shares: resolving entrypoint.source to a module source, encoding the arguments of the ModuleEntrypoint interface, and turning the type definitions an entrypoint returns into a module. |
|
Package sdkmeta holds metadata about the SDK runtimes bundled in the engine.
|
Package sdkmeta holds metadata about the SDK runtimes bundled in the engine. |