Documentation
¶
Index ¶
- Constants
- Variables
- type Action
- type ActionDetail
- type Bucket
- type BucketFactory
- type Client
- type ClientAirflow
- type DAGObj
- type DAGs
- type DagCompiler
- type DagRun
- type DagRunListResponse
- type DagRunRequest
- type PermissionSet
- type ProjectGetter
- type ResourceDetail
- type Schedule
- type Scheduler
- func (s *Scheduler) AddRole(ctx context.Context, tnnt tenant.Tenant, roleName string, ifNotExist bool) error
- func (s *Scheduler) CancelRun(ctx context.Context, tnnt tenant.Tenant, jobName scheduler.JobName, ...) error
- func (s *Scheduler) Clear(ctx context.Context, t tenant.Tenant, jobName scheduler.JobName, ...) error
- func (s *Scheduler) ClearBatch(ctx context.Context, tnnt tenant.Tenant, jobName scheduler.JobName, ...) error
- func (s *Scheduler) CreateRun(ctx context.Context, tnnt tenant.Tenant, jobName scheduler.JobName, ...) error
- func (s *Scheduler) DeleteJobs(ctx context.Context, t tenant.Tenant, jobNames []string) error
- func (s *Scheduler) DeployJobs(ctx context.Context, tenant tenant.Tenant, jobs []*scheduler.JobWithDetails) error
- func (s *Scheduler) GetJobRuns(ctx context.Context, tnnt tenant.Tenant, jobQuery *scheduler.JobRunsCriteria, ...) ([]*scheduler.JobRunStatus, error)
- func (s *Scheduler) GetJobRunsWithDetails(ctx context.Context, tnnt tenant.Tenant, jobQuery *scheduler.JobRunsCriteria, ...) ([]*scheduler.JobRunWithDetails, error)
- func (s *Scheduler) GetJobState(ctx context.Context, projectName tenant.ProjectName) (map[string]bool, error)
- func (s *Scheduler) GetOperatorInstance(ctx context.Context, tnnt tenant.Tenant, jobName scheduler.JobName, ...) (*scheduler.OperatorRunInstance, error)
- func (s *Scheduler) GetRolePermissions(ctx context.Context, t tenant.Tenant, roleName string) ([]string, error)
- func (s *Scheduler) ListJobs(ctx context.Context, t tenant.Tenant) ([]string, error)
- func (s *Scheduler) UpdateJobState(ctx context.Context, project tenant.ProjectName, jobNames []job.Name, ...) error
- type SchedulerAuth
- type SecretGetter
- type Tag
- type TaskInstance
Constants ¶
View Source
const (
EntityAirflow = "Airflow"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Action ¶ added in v0.19.0
type Action struct {
Action ActionDetail `json:"action"`
Resource ResourceDetail `json:"resource"`
}
type ActionDetail ¶ added in v0.19.0
type ActionDetail struct {
Name string `json:"name"`
}
type BucketFactory ¶
type Client ¶
type Client interface {
Invoke(ctx context.Context, r airflowRequest, auth SchedulerAuth) ([]byte, error)
}
type ClientAirflow ¶
type ClientAirflow struct {
// contains filtered or unexported fields
}
func NewAirflowClient ¶
func NewAirflowClient() *ClientAirflow
func (ClientAirflow) Invoke ¶
func (ac ClientAirflow) Invoke(ctx context.Context, r airflowRequest, auth SchedulerAuth) ([]byte, error)
type DAGObj ¶ added in v0.19.0
type DAGObj struct {
DAGDisplayName string `json:"dag_display_name"`
DAGID string `json:"dag_id"`
DefaultView string `json:"default_view"`
Description *string `json:"description"`
FileToken string `json:"file_token"`
Fileloc string `json:"fileloc"`
HasImportErrors bool `json:"has_import_errors"`
HasTaskConcurrencyLimits bool `json:"has_task_concurrency_limits"`
IsActive bool `json:"is_active"`
IsPaused bool `json:"is_paused"`
IsSubdag bool `json:"is_subdag"`
LastExpired *string `json:"last_expired"`
LastParsedTime string `json:"last_parsed_time"`
LastPickled *string `json:"last_pickled"`
MaxActiveRuns int `json:"max_active_runs"`
MaxActiveTasks int `json:"max_active_tasks"`
MaxConsecutiveFailedDAGRuns int `json:"max_consecutive_failed_dag_runs"`
NextDagRun string `json:"next_dagrun"`
NextDagRunCreateAfter string `json:"next_dagrun_create_after"`
NextDagRunDataIntervalEnd string `json:"next_dagrun_data_interval_end"`
NextDagRunDataIntervalStart string `json:"next_dagrun_data_interval_start"`
Owners []string `json:"owners"`
PickleID *string `json:"pickle_id"`
RootDagID *string `json:"root_dag_id"`
ScheduleInterval Schedule `json:"schedule_interval"`
SchedulerLock *string `json:"scheduler_lock"`
Tags []Tag `json:"tags"`
TimetableDescription string `json:"timetable_description"`
}
type DagCompiler ¶
type DagRun ¶
type DagRun struct {
ExecutionDate time.Time `json:"execution_date"`
State string `json:"state"`
ExternalTrigger bool `json:"external_trigger"`
DagRunID string `json:"dag_run_id"`
DagID string `json:"dag_id"`
LogicalDate time.Time `json:"logical_date"`
StartDate time.Time `json:"start_date"`
EndDate time.Time `json:"end_date"`
DataIntervalStart time.Time `json:"data_interval_start"`
DataIntervalEnd time.Time `json:"data_interval_end"`
LastSchedulingDecision time.Time `json:"last_scheduling_decision"`
RunType string `json:"run_type"`
}
type DagRunListResponse ¶
type DagRunRequest ¶
type DagRunRequest struct {
OrderBy string `json:"order_by"`
PageOffset int `json:"page_offset"`
PageLimit int `json:"page_limit"`
DagIds []string `json:"dag_ids"` // nolint: revive
ExecutionDateGte string `json:"execution_date_gte,omitempty"`
ExecutionDateLte string `json:"execution_date_lte,omitempty"`
}
type PermissionSet ¶ added in v0.19.0
type ProjectGetter ¶
type ResourceDetail ¶ added in v0.19.0
type ResourceDetail struct {
Name string `json:"name"`
}
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(l log.Logger, bucketFac BucketFactory, client Client, compiler DagCompiler, projectGetter ProjectGetter, secretGetter SecretGetter) *Scheduler
func (*Scheduler) ClearBatch ¶ added in v0.7.0
func (*Scheduler) DeleteJobs ¶
func (*Scheduler) DeployJobs ¶
func (*Scheduler) GetJobRuns ¶
func (s *Scheduler) GetJobRuns(ctx context.Context, tnnt tenant.Tenant, jobQuery *scheduler.JobRunsCriteria, jobCron *cron.ScheduleSpec) ([]*scheduler.JobRunStatus, error)
func (*Scheduler) GetJobRunsWithDetails ¶ added in v0.17.0
func (s *Scheduler) GetJobRunsWithDetails(ctx context.Context, tnnt tenant.Tenant, jobQuery *scheduler.JobRunsCriteria, jobCron *cron.ScheduleSpec) ([]*scheduler.JobRunWithDetails, error)
func (*Scheduler) GetJobState ¶ added in v0.19.0
func (s *Scheduler) GetJobState(ctx context.Context, projectName tenant.ProjectName) (map[string]bool, error)
GetJobState sets the state of jobs disabled on scheduler
func (*Scheduler) GetOperatorInstance ¶ added in v0.22.0
func (*Scheduler) GetRolePermissions ¶ added in v0.19.0
type SchedulerAuth ¶
type SchedulerAuth struct {
// contains filtered or unexported fields
}
type SecretGetter ¶
type SecretGetter interface {
Get(ctx context.Context, projName tenant.ProjectName, namespaceName, name string) (*tenant.PlainTextSecret, error)
}
type TaskInstance ¶ added in v0.22.0
type TaskInstance struct {
TaskID string `json:"task_id"`
TaskDisplayName string `json:"task_display_name"`
DagID string `json:"dag_id"`
DagRunID string `json:"dag_run_id"`
ExecutionDate string `json:"execution_date"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Duration *float64 `json:"duration"`
State *string `json:"state"` // nullable
TryNumber int `json:"try_number"`
MapIndex int `json:"map_index"`
MaxTries int `json:"max_tries"`
Hostname string `json:"hostname"`
Pool string `json:"pool"`
PoolSlots int `json:"pool_slots"`
Queue string `json:"queue"`
PriorityWeight int `json:"priority_weight"`
Operator string `json:"operator"`
QueuedWhen string `json:"queued_when"`
Pid int `json:"pid"`
Note string `json:"note"`
}
Click to show internal directories.
Click to hide internal directories.