Documentation ¶
Index ¶
- Constants
- Variables
- func GroupJobsByTenant(j []*JobWithDetails) map[tenant.Tenant][]*JobWithDetails
- type Alert
- type ConfigMap
- type Event
- type EventName
- type Executor
- type ExecutorInput
- type ExecutorType
- type HTTPUpstreams
- type Hook
- type Job
- type JobEventCategory
- type JobEventType
- type JobMetadata
- type JobName
- type JobRun
- type JobRunID
- type JobRunStatus
- type JobRunStatusList
- func (j JobRunStatusList) GetSortedRunsByScheduledAt() []*JobRunStatus
- func (j JobRunStatusList) GetSortedRunsByStates(states []State) []*JobRunStatus
- func (j JobRunStatusList) MergeWithUpdatedRuns(updatedRunMap map[time.Time]State) []*JobRunStatus
- func (j JobRunStatusList) OverrideWithStatus(status State) []*JobRunStatus
- func (j JobRunStatusList) ToRunStatusMap() map[time.Time]State
- type JobRunsCriteria
- type JobUpstream
- type JobWithDetails
- type NotifyAttrs
- type OperatorRun
- type OperatorType
- type Replay
- func (r *Replay) Config() *ReplayConfig
- func (r *Replay) CreatedAt() time.Time
- func (r *Replay) ID() uuid.UUID
- func (r *Replay) JobName() JobName
- func (r *Replay) Message() string
- func (r *Replay) State() ReplayState
- func (r *Replay) Tenant() tenant.Tenant
- func (r *Replay) UserState() ReplayUserState
- type ReplayConfig
- type ReplayState
- type ReplayUserState
- type ReplayWithRun
- type Resource
- type ResourceConfig
- type Retry
- type RunConfig
- type RuntimeConfig
- type SLAObject
- type Schedule
- type State
- type Task
- type Upstreams
Constants ¶
View Source
const ( EntityEvent = "event" ISODateFormat = "2006-01-02T15:04:05Z" EventCategorySLAMiss JobEventCategory = "sla_miss" EventCategoryJobFailure JobEventCategory = "failure" SLAMissEvent JobEventType = "sla_miss" JobFailureEvent JobEventType = "failure" JobSuccessEvent JobEventType = "job_success" TaskStartEvent JobEventType = "task_start" TaskRetryEvent JobEventType = "task_retry" TaskFailEvent JobEventType = "task_fail" TaskSuccessEvent JobEventType = "task_success" HookStartEvent JobEventType = "hook_start" HookRetryEvent JobEventType = "hook_retry" HookFailEvent JobEventType = "hook_fail" HookSuccessEvent JobEventType = "hook_success" SensorStartEvent JobEventType = "sensor_start" SensorRetryEvent JobEventType = "sensor_retry" SensorFailEvent JobEventType = "sensor_fail" SensorSuccessEvent JobEventType = "sensor_success" )
View Source
const ( EntityJobRun = "jobRun" OperatorTask OperatorType = "task" OperatorSensor OperatorType = "sensor" OperatorHook OperatorType = "hook" UpstreamTypeStatic = "static" UpstreamTypeInferred = "inferred" )
View Source
const ( MetricNotificationQueue = "notification_queue_total" MetricNotificationWorkerBatch = "notification_worker_batch_total" MetricNotificationWorkerSendErr = "notification_worker_send_err_total" )
View Source
const ( // initial state ReplayStateCreated ReplayState = "created" // running state ReplayStateInProgress ReplayState = "in progress" ReplayStatePartialReplayed ReplayState = "partial replayed" ReplayStateReplayed ReplayState = "replayed" // terminal state ReplayStateInvalid ReplayState = "invalid" ReplayStateSuccess ReplayState = "success" ReplayStateFailed ReplayState = "failed" // state on presentation layer ReplayUserStateCreated ReplayUserState = "created" ReplayUserStateInProgress ReplayUserState = "in progress" ReplayUserStateInvalid ReplayUserState = "invalid" ReplayUserStateSuccess ReplayUserState = "success" ReplayUserStateFailed ReplayUserState = "failed" EntityReplay = "replay" )
Variables ¶
View Source
var TaskEndStates = []State{StateSuccess, StateFailed, StateRetry}
Functions ¶
func GroupJobsByTenant ¶
func GroupJobsByTenant(j []*JobWithDetails) map[tenant.Tenant][]*JobWithDetails
Types ¶
type Event ¶
type Executor ¶
type Executor struct { Name string Type ExecutorType }
func ExecutorFrom ¶
func ExecutorFrom(name string, executorType ExecutorType) (Executor, error)
func ExecutorFromEnum ¶
type ExecutorInput ¶
type ExecutorType ¶
type ExecutorType string
const ( ExecutorTask ExecutorType = "task" ExecutorHook ExecutorType = "hook" )
func ExecutorTypeFrom ¶
func ExecutorTypeFrom(val string) (ExecutorType, error)
func (ExecutorType) String ¶
func (e ExecutorType) String() string
type HTTPUpstreams ¶
type Job ¶
type JobEventCategory ¶
type JobEventCategory string
type JobEventType ¶
type JobEventType string
func FromStringToEventType ¶
func FromStringToEventType(name string) (JobEventType, error)
func (JobEventType) IsOfType ¶
func (event JobEventType) IsOfType(category JobEventCategory) bool
func (JobEventType) String ¶ added in v0.7.0
func (event JobEventType) String() string
type JobMetadata ¶
type JobRunID ¶
func JobRunIDFromString ¶
type JobRunStatus ¶
func JobRunStatusFrom ¶
func JobRunStatusFrom(scheduledAt time.Time, state string) (JobRunStatus, error)
func (JobRunStatus) GetLogicalTime ¶ added in v0.7.0
func (j JobRunStatus) GetLogicalTime(jobCron *cron.ScheduleSpec) time.Time
type JobRunStatusList ¶ added in v0.7.0
type JobRunStatusList []*JobRunStatus
func (JobRunStatusList) GetSortedRunsByScheduledAt ¶ added in v0.8.0
func (j JobRunStatusList) GetSortedRunsByScheduledAt() []*JobRunStatus
func (JobRunStatusList) GetSortedRunsByStates ¶ added in v0.7.0
func (j JobRunStatusList) GetSortedRunsByStates(states []State) []*JobRunStatus
func (JobRunStatusList) MergeWithUpdatedRuns ¶ added in v0.7.0
func (j JobRunStatusList) MergeWithUpdatedRuns(updatedRunMap map[time.Time]State) []*JobRunStatus
func (JobRunStatusList) OverrideWithStatus ¶ added in v0.9.0
func (j JobRunStatusList) OverrideWithStatus(status State) []*JobRunStatus
func (JobRunStatusList) ToRunStatusMap ¶ added in v0.7.0
func (j JobRunStatusList) ToRunStatusMap() map[time.Time]State
type JobRunsCriteria ¶
type JobRunsCriteria struct { Name string StartDate time.Time EndDate time.Time Filter []string OnlyLastRun bool }
JobRunsCriteria represents the filter condition to get run status from scheduler
func (*JobRunsCriteria) ExecutionEndDate ¶
func (c *JobRunsCriteria) ExecutionEndDate(jobCron *cron.ScheduleSpec) time.Time
func (*JobRunsCriteria) ExecutionStart ¶
func (c *JobRunsCriteria) ExecutionStart(cron *cron.ScheduleSpec) time.Time
type JobUpstream ¶
type JobWithDetails ¶
type JobWithDetails struct { Name JobName Job *Job JobMetadata *JobMetadata Schedule *Schedule Retry Retry Alerts []Alert RuntimeConfig RuntimeConfig Priority int Upstreams Upstreams }
JobWithDetails contains the details for a job
func (*JobWithDetails) GetLabelsAsString ¶
func (j *JobWithDetails) GetLabelsAsString() string
func (*JobWithDetails) GetName ¶
func (j *JobWithDetails) GetName() string
func (*JobWithDetails) GetUniqueLabelValues ¶ added in v0.8.0
func (j *JobWithDetails) GetUniqueLabelValues() []string
func (*JobWithDetails) SLADuration ¶
func (j *JobWithDetails) SLADuration() (int64, error)
type NotifyAttrs ¶
type OperatorRun ¶
type OperatorType ¶
type OperatorType string
func (OperatorType) String ¶
func (o OperatorType) String() string
type Replay ¶ added in v0.7.0
type Replay struct {
// contains filtered or unexported fields
}
func NewReplay ¶ added in v0.7.0
func NewReplay(id uuid.UUID, jobName JobName, tenant tenant.Tenant, config *ReplayConfig, state ReplayState, createdAt time.Time) *Replay
func NewReplayRequest ¶ added in v0.7.0
func NewReplayRequest(jobName JobName, tenant tenant.Tenant, config *ReplayConfig, state ReplayState) *Replay
func (*Replay) Config ¶ added in v0.7.0
func (r *Replay) Config() *ReplayConfig
func (*Replay) State ¶ added in v0.7.0
func (r *Replay) State() ReplayState
func (*Replay) UserState ¶ added in v0.8.1
func (r *Replay) UserState() ReplayUserState
type ReplayConfig ¶ added in v0.7.0
type ReplayConfig struct { StartTime time.Time EndTime time.Time Parallel bool JobConfig map[string]string Description string }
func NewReplayConfig ¶ added in v0.7.0
type ReplayState ¶ added in v0.7.0
type ReplayState string // contract status for business layer
func ReplayStateFromString ¶ added in v0.7.0
func ReplayStateFromString(state string) (ReplayState, error)
func (ReplayState) String ¶ added in v0.7.0
func (j ReplayState) String() string
type ReplayUserState ¶ added in v0.8.1
type ReplayUserState string // contract status for presentation layer
func (ReplayUserState) String ¶ added in v0.8.1
func (j ReplayUserState) String() string
type ReplayWithRun ¶ added in v0.7.0
type ReplayWithRun struct { Replay *Replay Runs []*JobRunStatus // TODO: JobRunStatus does not have `message/log` }
func (*ReplayWithRun) GetFirstExecutableRun ¶ added in v0.7.0
func (r *ReplayWithRun) GetFirstExecutableRun() *JobRunStatus
func (*ReplayWithRun) GetLastExecutableRun ¶ added in v0.7.0
func (r *ReplayWithRun) GetLastExecutableRun() *JobRunStatus
type Resource ¶
type Resource struct { Request *ResourceConfig Limit *ResourceConfig }
type ResourceConfig ¶
type RuntimeConfig ¶
type State ¶
type State string
const ( StatePending State = "pending" StateAccepted State = "accepted" StateRunning State = "running" StateQueued State = "queued" StateRetry State = "retried" StateSuccess State = "success" StateFailed State = "failed" StateWaitUpstream State = "wait_upstream" StateInProgress State = "in_progress" StateMissing State = "missing" )
func StateFromString ¶
type Upstreams ¶
type Upstreams struct { HTTP []*HTTPUpstreams UpstreamJobs []*JobUpstream }
Click to show internal directories.
Click to hide internal directories.