cueflow

package
v0.0.0-...-9004d47 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 43 Imported by: 0

Documentation

Overview

Package cueflow GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

View Source
var ControlPath = cue.ParsePath("$$control.name")
View Source
var DepPath = cue.ParsePath("$dep")
View Source
var OkPath = cue.ParsePath("$ok")
View Source
var TaskPath = internal.TaskPath
View Source
var TaskPathContext = contextx.New[string](contextx.WithDefaultsFunc(func() string {
	return ""
}))
View Source
var TaskRunnerFactoryContext = contextx.New[TaskRunnerResolver]()

Functions

func CueLogValue

func CueLogValue(v any) slog.LogValuer

func CueValue

func CueValue(v Value) cue.Value

func IterSteps

func IterSteps(value cue.Value) (func(yield func(idx int, item cue.Value) bool), error)

func RegisterTask

func RegisterTask(r TaskImplRegister, task FlowTask)

func SortedIter

func SortedIter[V any](ctx context.Context, m map[string]V) <-chan *Element[V]

func Tracer

func Tracer() trace.Tracer

func WriteFile

func WriteFile(ctx context.Context, fs filesystem.FileSystem, filename string, data []byte) error

Types

type CacheDisabler

type CacheDisabler interface {
	CacheDisabled() bool
}

type CanSkip

type CanSkip interface {
	Skip() bool
}

type Checkpoint

type Checkpoint interface {
	AsCheckpoint() bool
}

type CueValueWrapper

type CueValueWrapper interface {
	CueValue() cue.Value
}

type Element

type Element[V any] struct {
	Key   string
	Value V
}

+gengo:runtimedoc=false

type FlowControl

type FlowControl interface {
	FlowTask
	// contains filtered or unexported methods
}

type FlowControlImpl

type FlowControlImpl struct {
}

type FlowTask

type FlowTask interface {
	// contains filtered or unexported methods
}

type OutputValuer

type OutputValuer interface {
	OutputValues() map[string]any
}

type ProcessReader

type ProcessReader interface {
	io.Reader

	Process(ctx context.Context) <-chan Progress
}

func NewProcessReader

func NewProcessReader(r io.Reader, total int64) ProcessReader

type ProcessWriter

type ProcessWriter interface {
	io.Writer
	Process(ctx context.Context) <-chan Progress
}

func NewProcessWriter

func NewProcessWriter(total int64) ProcessWriter

type Progress

type Progress struct {
	Current int64
	Total   int64
}

func (Progress) RuntimeDoc

func (v Progress) RuntimeDoc(names ...string) ([]string, bool)

type ResultValuer

type ResultValuer interface {
	ResultValue() map[string]any
}

type Runner

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

func NewRunner

func NewRunner(build func() (Value, error)) *Runner

func (*Runner) FillPath

func (r *Runner) FillPath(p cue.Path, v any) error

func (*Runner) LookupPath

func (r *Runner) LookupPath(p cue.Path) Value

func (*Runner) LookupResult

func (r *Runner) LookupResult(p cue.Path) (any, bool)

func (*Runner) Processed

func (r *Runner) Processed(p cue.Path) bool

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, action []string) error

func (*Runner) RunTasks

func (r *Runner) RunTasks(ctx context.Context, optFns ...TaskOptionFunc) error

func (*Runner) Value

func (r *Runner) Value() Value

type Scope

type Scope interface {
	Value() Value
	LookupPath(path cue.Path) Value
	FillPath(path cue.Path, value any) error
	Processed(path cue.Path) bool
	LookupResult(path cue.Path) (any, bool)
	RunTasks(ctx context.Context, optFns ...TaskOptionFunc) error
}

type StepRunner

type StepRunner interface {
	Do(ctx context.Context) error
}

type Successor

type Successor interface {
	Success() bool
}

type Task

type Task interface {
	Scope() Scope
	Name() string
	Path() cue.Path
	Deps() []cue.Path
	Value() Value
	Decode(inputs any) error
}

func NewTask

func NewTask(scope Scope, node internal.Node) Task

type TaskFactory

type TaskFactory interface {
	TaskRunnerResolver
	TaskImplRegister
	Sources(ctx context.Context) (filesystem.FileSystem, error)
}

func NewTaskFactory

func NewTaskFactory(domain string) TaskFactory

type TaskFeedback

type TaskFeedback interface {
	Done(err error)
}

type TaskImpl

type TaskImpl struct {
}

type TaskImplRegister

type TaskImplRegister interface {
	Register(t any)
}

type TaskOptionFunc

type TaskOptionFunc = internal.OptionFunc

func WithPrefix

func WithPrefix(path cue.Path) TaskOptionFunc

type TaskRunner

type TaskRunner interface {
	Path() cue.Path
	Underlying() any
	Run(ctx context.Context) error
}

type TaskRunnerFactory

type TaskRunnerFactory interface {
	New(task Task) (TaskRunner, error)
}

type TaskRunnerResolver

type TaskRunnerResolver interface {
	ResolveTaskRunner(task Task) (TaskRunner, error)
}

type TaskSetup

type TaskSetup interface {
	Setup() bool
}

TaskSetup which task will run before all others tasks

type TaskUnmarshaler

type TaskUnmarshaler interface {
	UnmarshalTask(t Task) error
}

type Value

type Value interface {
	Path() cue.Path
	Pos() token.Pos

	Exists() bool
	LookupPath(p cue.Path) Value
	FillPath(p cue.Path, v any) Value

	Decode(target any) error
	Source(opts ...cue.Option) string
}

func WrapValue

func WrapValue(cueValue cue.Value) Value

type WithScopeName

type WithScopeName interface {
	ScopeName(ctx context.Context) (string, error)
}

Directories

Path Synopsis
Package cueify GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Package cueify GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Package internal GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE
Package internal GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Jump to

Keyboard shortcuts

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