Documentation ¶
Index ¶
Constants ¶
View Source
const ( SeverityAlert = "alert" SeverityWarning = "warning" SeverityNone = "none" )
Variables ¶
View Source
var ErrJobAlreadyRunning = errors.New("A job with same ID is already running")
View Source
var ValidSeverities = []Severity{SeverityAlert, SeverityWarning, SeverityNone}
Functions ¶
Types ¶
type JobRun ¶
type JobRun struct { ID string `json:"id"` Command string `json:"command"` StartedAt common.Timestamp `json:"job_started"` EndedAt *common.Timestamp `json:"job_ended"` Duration *uint64 `json:"job_duration_s"` User string `json:"job_user"` ExitCode *int `json:"exit_code"` Severity Severity `json:"severity"` NextRunIn *int `json:"next_run_in"` StdOut *string `json:"stdout"` StdErr *string `json:"stderr"` Errors []string `json:"errors,omitempty"` }
type JobRunConfig ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
type SpoolManager ¶
type SpoolManager struct {
// contains filtered or unexported fields
}
func NewSpoolManager ¶
func NewSpoolManager(dirPath string, logger *logrus.Logger) *SpoolManager
NewSpoolManager creates a new object to manage jobmon spool dirPath must be absolute path
func (*SpoolManager) GetFinishedJobs ¶
func (s *SpoolManager) GetFinishedJobs() ([]string, []*JobRun, error)
func (*SpoolManager) NewJob ¶
func (s *SpoolManager) NewJob(r *JobRun, forcedRun bool) (string, error)
func (*SpoolManager) RemoveJobs ¶
func (s *SpoolManager) RemoveJobs(ids []string) error
Click to show internal directories.
Click to hide internal directories.