scheduler

package
v1.0.4-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

WireSet provides a wire set for this package.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Kind    string
	Type    string
	OS      string
	Arch    string
	Kernel  string
	Variant string
	Labels  map[string]string
}

Filter provides filter criteria to limit stages requested from the scheduler.

type Scheduler

type Scheduler interface {
	// Schedule schedules the stage for execution.
	Schedule(ctx context.Context, stage *types.Stage) error

	// Request requests the next stage scheduled for execution.
	Request(ctx context.Context, filter Filter) (*types.Stage, error)

	// Cancel cancels scheduled or running jobs associated
	// with the parent build ID.
	Cancel(context.Context, int64) error

	// Cancelled blocks and listens for a cancellation event and
	// returns true if the build has been cancelled.
	Cancelled(context.Context, int64) (bool, error)
}

Scheduler schedules Build stages for execution.

func ProvideScheduler

func ProvideScheduler(
	stageStore store.StageStore,
	lock lock.MutexManager,
) (Scheduler, error)

ProvideScheduler provides a scheduler which can be used to schedule and request builds.

Jump to

Keyboard shortcuts

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