runtime

package
v0.7.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const VEG_DAGGER_ENGINE_ENV_VAR = "VEG_EXPERIMENTAL_DAGGER_RUNNER_HOST"
View Source
const VEG_DAGGER_HOST = "container://veg-dagger-engine"

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentEnricher

type AgentEnricher func(*Runtime, *agent.Agent) error

type DatamodelEnricher added in v0.6.8

type DatamodelEnricher func(*Runtime, *datamodel.Datamodel) error

type EnvEnricher

type EnvEnricher func(*Runtime, *env.Env) error

type FlowEnricher added in v0.6.9

type FlowEnricher func(*Runtime, *flow.Flow) error

type GeneratorEnricher added in v0.6.8

type GeneratorEnricher func(*Runtime, *gen.Generator) error

type Runtime

type Runtime struct {
	sync.Mutex
	Ctx context.Context

	// original flags used to load the CUE
	Flags flags.RootPflagpole

	// Other important dirs when loading templates (auto set)
	WorkingDir    string
	CueModuleRoot string
	CueExtractDir string // where CUE extract modules to
	RootToCwd     string // module root -> working dir (foo/bar)
	CwdToRoot     string // module root <- working dir (../..)
	// OutputDir     string  // where gen wants to write (tbd, other commands too)
	OriginalWkdir string // when we need to cd and then output back to this directory (create related, but could expand)

	DepMapping map[string]string // map of module paths to module names, used for loading modules

	// CUE related fields
	Entrypoints    []string
	CueContext     *cue.Context
	CueConfig      *load.Config
	BuildInstances []*build.Instance
	FieldOpts      []cue.Option

	// Dagger related fields
	DagClient *dagger.Client

	// this is a bit hacky, but we use this with vet to validate data (and probably st as well)
	DontPlaceOrphanedFiles bool

	// The CUE value after all loading
	Value cue.Value

	// we need to rethink how we organize the code
	// in each of these packages so we can separate
	// the commands from the types and core logic
	Nodes []*hof.Node[any]
	// Chats      []*chat.Chat
	Envs       []*env.Env
	Agents     []*agent.Agent
	Datamodels []*datamodel.Datamodel
	Generators []*gen.Generator
	Workflows  []*flow.Flow

	Stats RuntimeStats
	// contains filtered or unexported fields
}

This is the hof Runtime that backs most commands

func New added in v0.6.8

func New(entrypoints []string, rflags flags.RootPflagpole) (*Runtime, error)

func (*Runtime) DaggerInit

func (R *Runtime) DaggerInit() (err error)

func (*Runtime) EnrichAgent

func (R *Runtime) EnrichAgent(agents []string, enrich AgentEnricher) error

func (*Runtime) EnrichDatamodels added in v0.6.8

func (R *Runtime) EnrichDatamodels(datamodels []string, enrich DatamodelEnricher) error

func (*Runtime) EnrichEnv

func (R *Runtime) EnrichEnv(envs []string, enrich EnvEnricher) error

func (*Runtime) EnrichFlows added in v0.6.9

func (R *Runtime) EnrichFlows(flows []string, enrich FlowEnricher) error

func (*Runtime) EnrichGenerators added in v0.6.8

func (R *Runtime) EnrichGenerators(generators []string, enrich GeneratorEnricher) error

func (*Runtime) GetLoadedFiles added in v0.6.9

func (R *Runtime) GetLoadedFiles() []string

func (*Runtime) Load added in v0.6.8

func (R *Runtime) Load() (err error)

func (*Runtime) LoadOrphanedFile added in v0.6.9

func (R *Runtime) LoadOrphanedFile(f *build.File, pkgName string, root, dir string, index, total int) (F *ast.File, err error)

func (*Runtime) OutputDir added in v0.6.8

func (R *Runtime) OutputDir(dir string) string

OutputDir returns the absolute path to output dir for this runtime. It accounts for module root and relative directories.

type RuntimeStats added in v0.6.8

type RuntimeStats map[string]time.Duration

func (RuntimeStats) Add added in v0.6.9

func (S RuntimeStats) Add(name string, dur time.Duration)

func (RuntimeStats) String added in v0.6.8

func (S RuntimeStats) String() string

Jump to

Keyboard shortcuts

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