orchestrate

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppInstalled = device.AppInstalled

Functions

func DeviceLabel

func DeviceLabel(devs map[string]device.Info) string

Types

type HookCrash added in v0.5.3

type HookCrash struct {
	Hook  string
	Value any
	Stack []byte
}

func (*HookCrash) Error added in v0.5.3

func (c *HookCrash) Error() string

type Hooks

type Hooks struct {
	Options  func(job *Job, devs map[string]device.Info) engine.Options
	Started  func(job *Job, devs map[string]device.Info)
	Finished func(res Result)
	Notice   func(job *Job, d device.Info, msg string)
	Prepare  func(ctx context.Context, d device.Info, drv driver.Driver)
	Failure  func(r Result, drivers map[string]driver.Driver, notes map[string]string)
}

type Job

type Job struct {
	Flow      *flow.Flow
	Needs     []Need
	Attempt   int
	Seq       bool
	ShardID   int
	DebugName string
	// contains filtered or unexported fields
}

type MultiResult

type MultiResult struct {
	Status   engine.Status
	Err      error
	Duration time.Duration
	Devices  map[string]string
	Videos   []engine.Video
}

func RunMulti

func RunMulti(ctx context.Context, f *flow.Flow, drivers map[string]driver.Driver, base engine.Options) (res MultiResult)

type Need

type Need struct {
	Role     string
	Platform string
	Device   string
	AppID    string
	Mobile   bool
}

func NeedsFor

func NeedsFor(f *flow.Flow, platform string, env []flow.KV) []Need

type Pool

type Pool struct {
	Installed     func(serial, appID string) bool
	LockAs        string
	KeepAgents    bool
	WaitForDevice time.Duration
	Reclaim       func(ctx context.Context, serial string) Reclaimed
	Prefer        string
	// contains filtered or unexported fields
}

func NewPool

func NewPool(devs []device.Info) *Pool

func (*Pool) CheckApps

func (p *Pool) CheckApps(ctx context.Context, jobs []*Job)

func (*Pool) Close

func (p *Pool) Close()

func (*Pool) Devices

func (p *Pool) Devices() []device.Info

func (*Pool) Driver

func (p *Pool) Driver(ctx context.Context, d device.Info) (driver.Driver, error)

func (*Pool) PassedOver added in v0.6.4

func (p *Pool) PassedOver(n Need, chosen string) (passed []string, others int)

type Reclaimed added in v0.6.4

type Reclaimed struct {
	OK      bool
	Busy    bool
	Unknown bool
	Label   string
}

type Result

type Result struct {
	Job      *Job
	Devices  map[string]device.Info
	Status   engine.Status
	Err      error
	Duration time.Duration
	Start    time.Time
	Steps    []engine.StepResult
	Runner   *engine.Runner
	Videos   []engine.Video
	Retried  bool
	// contains filtered or unexported fields
}

func Schedule

func Schedule(ctx context.Context, pool *Pool, jobs []*Job, retries, maxParallel int, continueSeq bool, hooks Hooks) []Result

Jump to

Keyboard shortcuts

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