Documentation
¶
Index ¶
- Constants
- Variables
- func AggregateCheckStatus1d(ctx context.Context) (int, error)
- func AggregateCheckStatus1h(ctx context.Context) (int, error)
- func CleanupSoftDeletedComponents(ctx context.Context, olderThan time.Duration) (int, error)
- func DeleteOldCheckStatuses(ctx context.Context, retention int) (int, error)
- func DeleteOldCheckStatuses1d(ctx context.Context, retention int) (int, error)
- func DeleteOldCheckStatuses1h(ctx context.Context, retention int) (int, error)
- func RefreshCheckStatusSummary(ctx context.Context) error
- func RefreshCheckStatusSummaryAged(ctx context.Context) error
- type Job
- func (j *Job) AddToScheduler(cronRunner *cron.Cron) error
- func (j *Job) FindHistory(statuses ...string) ([]models.JobHistory, error)
- func (j *Job) GetEntry(cronRunner *cron.Cron) *cron.Entry
- func (j *Job) GetResourcedName() string
- func (j *Job) Label() string
- func (j *Job) RemoveFromScheduler(cronRunner *cron.Cron)
- func (j *Job) Reschedule(schedule string, cronRunner *cron.Cron) error
- func (j *Job) Retain(r Retention) *Job
- func (j *Job) Run()
- func (j *Job) RunOnStart() *Job
- func (j *Job) SetID(id string) *Job
- func (j *Job) SetTimeout(t time.Duration) *Job
- func (j *Job) String() string
- func (j *Job) Unschedule()
- type JobRuntime
- type Retention
- type StatusRing
Constants ¶
View Source
const ( ResourceTypeCheckStatuses = "check_statuses" ResourceTypeComponent = "components" ResourceTypePlaybook = "playbook" ResourceTypeScraper = "config_scraper" ResourceTypeUpstream = "upstream" )
Variables ¶
View Source
var RetentionBalanced = Retention{
Success: 3,
Failed: 3,
}
View Source
var RetentionFailed = Retention{
Success: 0,
Failed: 3,
}
View Source
var RetentionFew = Retention{
Success: 1,
Failed: 3,
}
View Source
var RetentionHigh = Retention{
Success: 3,
Failed: 6,
}
Functions ¶
func AggregateCheckStatus1d ¶ added in v1.0.245
func AggregateCheckStatus1h ¶ added in v1.0.245
func CleanupSoftDeletedComponents ¶ added in v1.0.267
func DeleteOldCheckStatuses ¶ added in v1.0.245
func DeleteOldCheckStatuses1d ¶ added in v1.0.245
func DeleteOldCheckStatuses1h ¶ added in v1.0.245
func RefreshCheckStatusSummary ¶ added in v1.0.245
func RefreshCheckStatusSummaryAged ¶ added in v1.0.245
Types ¶
type Job ¶ added in v1.0.202
type Job struct {
context.Context
Name string
Schedule string
Singleton bool
Debug, Trace bool
Timeout time.Duration
Fn func(ctx JobRuntime) error
JobHistory bool
RunNow bool
ID string
ResourceID, ResourceType string
Retention Retention
LastJob *models.JobHistory
// contains filtered or unexported fields
}
func CleanupStaleHistoryJob ¶ added in v1.0.415
func (*Job) AddToScheduler ¶ added in v1.0.202
func (*Job) FindHistory ¶ added in v1.0.250
func (j *Job) FindHistory(statuses ...string) ([]models.JobHistory, error)
func (*Job) GetResourcedName ¶ added in v1.0.418
func (*Job) RemoveFromScheduler ¶ added in v1.0.202
func (*Job) Reschedule ¶ added in v1.0.307
func (*Job) RunOnStart ¶ added in v1.0.202
func (*Job) Unschedule ¶ added in v1.0.245
func (j *Job) Unschedule()
type JobRuntime ¶
type JobRuntime struct {
context.Context
Job *Job
Span trace.Span
History *models.JobHistory
Table, Id string
// contains filtered or unexported fields
}
func (*JobRuntime) Failf ¶ added in v1.0.245
func (j *JobRuntime) Failf(message string, args ...interface{})
func (*JobRuntime) ID ¶ added in v1.0.250
func (j *JobRuntime) ID() string
type Retention ¶ added in v1.0.250
type StatusRing ¶ added in v1.0.325
type StatusRing struct {
// contains filtered or unexported fields
}
func (*StatusRing) Add ¶ added in v1.0.325
func (sr *StatusRing) Add(job *models.JobHistory)
Click to show internal directories.
Click to hide internal directories.