Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrJobNotFound ¶
type ErrJobNotFound struct{}
func (*ErrJobNotFound) Error ¶
func (e *ErrJobNotFound) Error() string
type Job ¶
type Job struct { Id uint `json:"-"` Name string `json:"name"` Description string `json:"description"` Script Script `json:"script"` }
func (*Job) NewJobRun ¶
func (job *Job) NewJobRun(trigger TriggerType) *JobRun
type JobRun ¶
type JobRun struct { Id uint64 `json:"id"` State JobRunState `json:"status"` StartTimestamp int64 `json:"startTimestamp"` EndTimestamp int64 `json:"endTimestamp,omitempty"` Trigger TriggerType `json:"trigger"` Job *Job `json:"-"` Pid *int `json:"pid"` // nil for not started ExitCode *int `json:"exitCode"` // nil for not started }
type JobRunState ¶
type JobRunState int
const ( JOB_RUN_STATE_UNKNOWN JobRunState = iota JOB_RUN_STATE_FAILED JOB_RUN_STATE_SUCCESS JOB_RUN_STATE_IN_PROGRESS JOB_RUN_STATE_NOT_STARTED )
func (JobRunState) IsFinished ¶
func (e JobRunState) IsFinished() bool
func (JobRunState) String ¶
func (e JobRunState) String() string
type TriggerType ¶
type TriggerType string
Click to show internal directories.
Click to hide internal directories.