Documentation
¶
Index ¶
- Constants
- func IsModuleSDKBuiltin(module string) bool
- type DangEvalOp
- func (op DangEvalOp) Backend() buildkit.CustomOpBackend
- func (op DangEvalOp) CacheMap(ctx context.Context, cm *solver.CacheMap) (*solver.CacheMap, error)
- func (op DangEvalOp) Digest() (digest.Digest, error)
- func (op DangEvalOp) Exec(ctx context.Context, g bksession.Group, inputs []solver.Result, ...) ([]solver.Result, error)
- func (op DangEvalOp) Name() string
- type DangRuntime
- type Loader
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
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) 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 (*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.
Click to show internal directories.
Click to hide internal directories.