targetrun

package
v0.0.0-...-6d0f970 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapTargetFailed

func WrapTargetFailed(err error, target *graph.Target) error

Types

type ManifestData

type ManifestData struct {
	GitCommit  string                       `json:"git_commit,omitempty"`
	GitRef     string                       `json:"git_ref,omitempty"`
	InputHash  string                       `json:"input_hash,omitempty"`
	DepsHashes map[string]map[string]string `json:"deps_hashes,omitempty"`
	OutHashes  map[string]string            `json:"out_hashes,omitempty"`
	Timestamp  time.Time                    `json:"timestamp"`
}

type Request

type Request struct {
	Target   *graph.Target
	Args     []string
	Mode     string // run or watch
	Compress bool
	RequestOpts
}

type RequestOpts

type RequestOpts struct {
	NoCache bool
	Force   bool
	Shell   bool
	// Force preserving cache for uncached targets when --print-out is enabled
	PreserveCache bool
	NoPTY         bool
	PullCache     bool
}

type Requests

type Requests []Request

func (Requests) Count

func (rrs Requests) Count(f func(rr Request) bool) int

func (Requests) Get

func (rrs Requests) Get(t *graph.Target) Request

func (Requests) Has

func (rrs Requests) Has(t *graph.Target) bool

func (Requests) Targets

func (rrs Requests) Targets() *graph.Targets

type Runner

type Runner struct {
	Root              *hroot.State
	Observability     *observability.Observability
	Finalizers        *finalizers.Finalizers
	LocalCache        *lcache.LocalCacheState
	PlatformProviders []platform.PlatformProvider
	GetFlowID         func() string
	QueryFunctions    func(*graph.Target) map[string]exprs.Func
	Cwd               string
	Config            *config.Config
	Pool              *worker2.Engine
}

func (*Runner) Run

func (e *Runner) Run(ctx context.Context, rr Request, iocfg sandbox.IOConfig, tracker *worker2.RunningTracker) (*Target, error)

func (*Runner) SandboxTreeRoot

func (e *Runner) SandboxTreeRoot(target specs.Specer) xfs.Path

type SrcRecorder

type SrcRecorder struct {
	Forward *SrcRecorder
	// contains filtered or unexported fields
}

func (*SrcRecorder) Add

func (s *SrcRecorder) Add(name, from, to, origin string)

func (*SrcRecorder) AddTar

func (s *SrcRecorder) AddTar(tar string, size int64)

func (*SrcRecorder) Named

func (s *SrcRecorder) Named() map[string][]string

func (*SrcRecorder) Origin

func (s *SrcRecorder) Origin() map[string]string

func (*SrcRecorder) Reset

func (s *SrcRecorder) Reset()

func (*SrcRecorder) Src

func (s *SrcRecorder) Src() []sandbox.File

func (*SrcRecorder) SrcTar

func (s *SrcRecorder) SrcTar() []sandbox.TarFile

type Target

type Target struct {
	*graph.Target
	SandboxRoot     xfs.Path
	SandboxLock     locks.Locker
	SandboxTreeRoot xfs.Path
	WorkdirRoot     xfs.Path
	OutRoot         xfs.Path
	Env             map[string]string
	BinDir          string
	Executor        platform.Executor
}

type TargetFailed

type TargetFailed struct {
	Target  *graph.Target
	LogFile string
	Err     error
}

func (TargetFailed) Error

func (t TargetFailed) Error() string

func (TargetFailed) Is

func (t TargetFailed) Is(target error) bool

func (TargetFailed) Unwrap

func (t TargetFailed) Unwrap() error

Jump to

Keyboard shortcuts

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