job

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintJobReport

func PrintJobReport(jobReports []JobReport)

Types

type JobChain

type JobChain struct {
	JobName string
	JobFunc JobFunc
}

type JobContext

type JobContext struct {
	Ctx  context.Context
	Repo *repository.Repository
}

func NewJobContext

func NewJobContext() *JobContext

type JobFunc

type JobFunc func(ctx context.Context) (JobStatus, time.Time, int64, error)

type JobReport

type JobReport struct {
	JobName       string
	Status        JobStatus
	Error         error
	StartedTime   time.Time
	ExecutionTime int64
}

type JobStatus

type JobStatus string
const (
	JOB_PENDING         JobStatus = "PENDING"
	JOB_IN_PROGRESS     JobStatus = "IN PROGRESS"
	JOB_SUCCESS         JobStatus = "SUCCESS"
	JOB_FAILED          JobStatus = "FAILED"
	JOB_NOTHING_CHANGED JobStatus = "NOTHING CHANGED"
)

Jump to

Keyboard shortcuts

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