Help us shape the future of Go! Take the 2026 Go Developer Survey

scheduler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultStatusChangeCallback

func DefaultStatusChangeCallback(task ScheduledTask, status Status)

Types

type Factory

type Factory interface {
	Create(provider string, options map[string]interface{}) (Scheduler, error)
}

type ScheduledTask

type ScheduledTask interface {
	Status() (Status, error)
	Subject() interface{}
}

type Scheduler

type Scheduler interface {
	ScheduleCompilation(f compilationdatastore.FilterParams) (ScheduledTask, error)
	ScheduleAnalysis(ref analysis.Reference) (ScheduledTask, error)
}

multiple schedulings of the same thing should not cause duplicates

type Status

type Status string
var (
	StatusUnknown   Status = "unknown"
	StatusPending   Status = "pending"
	StatusFailed    Status = "failed"
	StatusRunning   Status = "running"
	StatusFinishing Status = "finishing"
	StatusSucceeded Status = "finished"
)

func WaitForScheduledTask

func WaitForScheduledTask(t ScheduledTask, callback StatusChangeCallback) (Status, error)

type StatusChangeCallback

type StatusChangeCallback func(ScheduledTask, Status) // TODO pass only ScheduledTask.Subject()?

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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