Documentation ¶
Overview ¶
Package domain provides definitions for Scoot Jobs and Tasks
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GopterGenJob ¶
Wrapper function Generates a Job of Property Based Tests
func GopterGenJobDef ¶
Wrappper function that Generates a JobDefinition for Property Based Tests
func ValidateJob ¶
func ValidateJob(job JobDefinition) error
Validate a job, returning an *InvalidJobRequest if invalid.
func ValidateMaxTasks ¶
Types ¶
type Job ¶
type Job struct { Id string Def JobDefinition }
Job is the job Scoot can schedule
func DeserializeJob ¶
Desrialize a binary slice to a Job, an error is returned if it cannot be deserialized.
func GenRandomJob ¶
Generates a Random Job, using the supplied Rand with the specified Id and number of Tasks
type JobDefinition ¶
type JobDefinition struct { JobType string Requestor string Basis string Tag string Priority Priority Tasks []TaskDefinition }
JobDefinition is the definition the client sent us
func GenJobDef ¶
func GenJobDef(numTasks int) JobDefinition
Generates a Random JobDefintion with the specified number of tasks
func GenRandomJobDef ¶
func GenRandomJobDef(numTasks int, rng *rand.Rand) *JobDefinition
Generates a Random Job Definition, using the supplied Rand with the specified number of Tasks
func (*JobDefinition) String ¶
func (jd *JobDefinition) String() string
type OfflineWorkerReq ¶
type ReinstateWorkerReq ¶
type Status ¶
type Status int
Status for Job & Tasks
const ( // NotRunning, waiting to be scheduled NotStarted Status = iota // Currently Scheduled and In Progress Job/Task InProgress // Successfully Completed Job/Task Completed // Job was Aborted, Compensating Tasks are being Applied. // A RollingBack task has not finished its compensating // tasks yet. RollingBack // Job/Task finished unsuccessfully all compensating actions // have been applied. RolledBack )
type TaskDefinition ¶
Task is one task to run
func GenRandomTask ¶
func GenRandomTask(rng *rand.Rand, tag string) TaskDefinition
Generates a Random TaskDefinition, using the supplied Rand