sdk

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func IsModuleSDKBuiltin added in v0.18.19

func IsModuleSDKBuiltin(module string) bool

Return true if the given module is a builtin SDK.

Types

type DangEvalOp added in v0.20.2

type DangEvalOp struct {
	CacheDigest digest.Digest `json:"cacheDigest"`

	// IDs for reconstructing the module infrastructure in Exec.
	ModSourceID  *call.ID `json:"modSourceID"`
	SchemaFileID *call.ID `json:"schemaFileID"`

	// Module source subpath (where .dang files live).
	SourceSubpath string `json:"sourceSubpath"`

	// Execution metadata for the nested client.
	ExecMD *buildkit.ExecutionMetadata `json:"execMD"`

	// Function call data.
	ParentName string                       `json:"parentName"`
	FnName     string                       `json:"fnName"`
	ParentJSON json.RawMessage              `json:"parentJSON"`
	InputArgs  []*core.FunctionCallArgValue `json:"inputArgs"`
}

DangEvalOp is a buildkit custom op that evaluates a Dang module function call. All fields are JSON-serializable. On cache miss, Exec reconstructs the module infrastructure from the dagql server and runs the Dang interpreter. On cache hit, the cached result is returned directly.

func (DangEvalOp) Backend added in v0.20.2

func (op DangEvalOp) Backend() buildkit.CustomOpBackend

func (DangEvalOp) CacheMap added in v0.20.2

func (op DangEvalOp) CacheMap(ctx context.Context, cm *solver.CacheMap) (*solver.CacheMap, error)

func (DangEvalOp) Digest added in v0.20.2

func (op DangEvalOp) Digest() (digest.Digest, error)

func (DangEvalOp) Exec added in v0.20.2

func (op DangEvalOp) Exec(ctx context.Context, g bksession.Group, inputs []solver.Result, opt buildkit.OpOpts) ([]solver.Result, error)

func (DangEvalOp) Name added in v0.20.2

func (op DangEvalOp) Name() string

type DangRuntime added in v0.20.2

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

DangRuntime is a native Dang runtime that doesn't use containers

func (*DangRuntime) AsContainer added in v0.20.2

func (r *DangRuntime) AsContainer() (dagql.ObjectResult[*core.Container], bool)

func (*DangRuntime) Call added in v0.20.2

func (r *DangRuntime) Call(
	ctx context.Context,
	execMD *buildkit.ExecutionMetadata,
	fnCall *core.FunctionCall,
) (res []byte, clientID string, rerr error)

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.

Jump to

Keyboard shortcuts

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