Documentation ¶
Index ¶
- Variables
- type Option
- func WithCachingEnabled(enable bool) Option
- func WithLocalStore(s store.Store) Option
- func WithMaxParallel(maxParallel int) Option
- func WithPredictedNumOfTasks(tasks int) Option
- func WithPullEnabled(enable bool) Option
- func WithPushEnabled(enable bool) Option
- func WithRemoteStore(s store.Store) Option
- type Playbook
- func (p *Playbook) Build(ctx context.Context) (err error)
- func (p *Playbook) DoneChan() chan struct{}
- func (p *Playbook) ErrorChannel() <-chan error
- func (p *Playbook) ExecutionTime() time.Duration
- func (p *Playbook) List() (err error)
- func (p *Playbook) Next() (_ *Status, err error)
- func (p *Playbook) String() string
- func (p *Playbook) TaskCanceled(taskID int) (err error)
- func (p *Playbook) TaskChannel() <-chan *bobtask.Task
- func (p *Playbook) TaskCompleted(taskID int) (err error)
- func (p *Playbook) TaskFailed(taskID int, taskErr error) (err error)
- func (p *Playbook) TaskNeedsRebuild(taskID int) (rebuildInfo RebuildInfo, err error)
- func (p *Playbook) TaskNoRebuildRequired(taskID int) (err error)
- func (p *Playbook) TaskStatus(taskname string) (ts *Status, _ error)
- type RebuildCause
- type RebuildInfo
- type State
- type Status
- type StatusMap
- type StatusSlice
- type TaskKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDone = fmt.Errorf("playbook is done")
View Source
var ErrFailed = fmt.Errorf("playbook failed")
View Source
var ErrWalkDone = fmt.Errorf("walking done")
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(p *Playbook)
func WithCachingEnabled ¶
func WithLocalStore ¶
func WithMaxParallel ¶
func WithPredictedNumOfTasks ¶
func WithPullEnabled ¶
func WithPushEnabled ¶
func WithRemoteStore ¶
type Playbook ¶
type Playbook struct { Tasks StatusMap // TasksOptimized uses a array instead of an map TasksOptimized StatusSlice // contains filtered or unexported fields }
func (*Playbook) ErrorChannel ¶
func (*Playbook) ExecutionTime ¶
func (*Playbook) TaskCanceled ¶
TaskCanceled sets a task to canceled
func (*Playbook) TaskChannel ¶
TaskChannel returns the next task
func (*Playbook) TaskCompleted ¶
TaskCompleted sets a task to completed
func (*Playbook) TaskFailed ¶
TaskFailed sets a task to failed
func (*Playbook) TaskNeedsRebuild ¶
func (p *Playbook) TaskNeedsRebuild(taskID int) (rebuildInfo RebuildInfo, err error)
TaskNeedsRebuild check if a tasks need a rebuild by looking at its hash value and its child tasks.
func (*Playbook) TaskNoRebuildRequired ¶
TaskNoRebuildRequired sets a task's state to indicate that no rebuild is required
type RebuildCause ¶
type RebuildCause string
const ( InputNotFoundInBuildInfo RebuildCause = "input-not-in-build-info" // aka local cache miss TaskForcedRebuild RebuildCause = "forced" DependencyChanged RebuildCause = "dependency-changed" TargetInvalid RebuildCause = "target-invalid" TargetNotInLocalStore RebuildCause = "target-not-in-localstore" )
func (*RebuildCause) String ¶
func (rc *RebuildCause) String() string
type RebuildInfo ¶
type RebuildInfo struct { // IsRequired tells if the task requires rebuild again IsRequired bool // Cause tells why the rebuild is required Cause RebuildCause // VerifyResult is the result of target filesystem verification VerifyResult target.VerifyResult }
RebuildInfo contains information about a task rebuild: if it's required and the cause for it
type StatusSlice ¶
type StatusSlice []*Status
Click to show internal directories.
Click to hide internal directories.