engine

package
v0.0.0-...-e3845cd Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheKeyManifestSchemaVersion = 1
	CacheKeyManifestMaxAge        = 15 * time.Minute
)

Variables

This section is empty.

Functions

func WriteCacheKeyManifest

func WriteCacheKeyManifest(path string, manifest *api.CacheKeyManifest) error

WriteCacheKeyManifest atomically writes a manifest with owner-only permissions. The manifest is intended for an immediate Run request using CacheKeyManifestPath, not for durable or cross-job cache storage.

Types

type CacheKeyManifestError

type CacheKeyManifestError struct {
	Reason     string
	DurationMs int64
}

func (*CacheKeyManifestError) Error

func (e *CacheKeyManifestError) Error() string

type Engine

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

func New

func New(p project.Project, worktree string) (*Engine, error)

func (*Engine) CacheKey

func (e *Engine) CacheKey(ctx context.Context, req Request) (*api.CacheKeyResult, error)

func (*Engine) CacheKeyWithManifest

func (e *Engine) CacheKeyWithManifest(ctx context.Context, req Request) (*api.CacheKeyResult, *api.CacheKeyManifest, error)

func (*Engine) Graph

func (e *Engine) Graph() *graph.Graph

func (*Engine) Run

func (e *Engine) Run(ctx context.Context, req Request) (*Outcome, error)

func (*Engine) SubscribeEvents

func (e *Engine) SubscribeEvents() <-chan api.Event

func (*Engine) SubscribeEventsLossless

func (e *Engine) SubscribeEventsLossless() <-chan api.Event

SubscribeEventsLossless returns a backpressured event subscription for consumers that must observe every event, such as direct CI progress output.

func (*Engine) Watch

func (e *Engine) Watch(ctx context.Context, req Request) error

type Outcome

type Outcome struct {
	Result   api.RunResult
	Instance *api.Instance
}

type Request

type Request struct {
	Target               string
	Worktree             string
	Mode                 api.RunMode
	MaxParallel          int
	CacheKeyManifestPath string
}

Jump to

Keyboard shortcuts

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