Documentation ¶
Index ¶
- type BaseModel
- type Execution
- type ExecutionEvent
- type ExecutionKey
- type LaunchPlan
- type LaunchPlanKey
- type LaunchPlanScheduleType
- type NodeExecution
- type NodeExecutionEvent
- type NodeExecutionKey
- type Project
- type ProjectDomain
- type Task
- type TaskExecution
- type TaskExecutionKey
- type TaskKey
- type Workflow
- type WorkflowKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct { ID uint `gorm:"index;AUTO_INCREMENT"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
This is the base model definition every flyteadmin model embeds. This is nearly identical to http://doc.gorm.io/models.html#conventions except that flyteadmin models define their own primary keys rather than use the ID as the primary key
type Execution ¶
type Execution struct { BaseModel ExecutionKey LaunchPlanID uint `gorm:"index"` WorkflowID uint `gorm:"index"` Phase string Closure []byte Spec []byte `gorm:"not null"` StartedAt *time.Time // Corresponds to the CreatedAt field in the Execution closure. // Prefixed with Execution to avoid clashes with gorm.Model CreatedAt ExecutionCreatedAt *time.Time // Corresponds to the UpdatedAt field in the Execution closure // Prefixed with Execution to avoid clashes with gorm.Model UpdatedAt ExecutionUpdatedAt *time.Time Duration time.Duration ExecutionEvents []ExecutionEvent // In the case of an aborted execution this string may be non-empty. // It should be ignored for any other value of phase other than aborted. AbortCause string // Corresponds to the execution mode used to trigger this execution Mode int32 // The "parent" execution (if there is one) that is related to this execution. SourceExecutionID uint // Descendant execution related to this execution. DescendantExecution *Execution // The parent node execution if this was launched by a node ParentNodeExecutionID uint // Cluster where execution was triggered Cluster string // Offloaded location of inputs LiteralMap. These are the inputs evaluated and contain applied defaults. InputsURI storage.DataReference // User specified inputs. This map might be incomplete and not include defaults applied UserInputsURI storage.DataReference }
Database model to encapsulate a (workflow) execution.
type ExecutionEvent ¶
type ExecutionKey ¶
type ExecutionKey struct { Project string `gorm:"primary_key;column:execution_project"` Domain string `gorm:"primary_key;column:execution_domain"` Name string `gorm:"primary_key;column:execution_name"` }
Execution primary key
type LaunchPlan ¶
type LaunchPlan struct { BaseModel LaunchPlanKey Spec []byte `gorm:"not null"` WorkflowID uint `gorm:"index"` Closure []byte `gorm:"not null"` // GORM doesn't save the zero value for ints, so we use a pointer for the State field State *int32 `gorm:"default:0"` Executions []Execution // Hash of the launch plan Digest []byte ScheduleType LaunchPlanScheduleType }
Database model to encapsulate a launch plan.
type LaunchPlanKey ¶
type LaunchPlanKey struct { Project string `gorm:"primary_key;index:lp_project_domain_name_idx,lp_project_domain_idx"` Domain string `gorm:"primary_key;index:lp_project_domain_name_idx,lp_project_domain_idx"` Name string `gorm:"primary_key;index:lp_project_domain_name_idx"` Version string `gorm:"primary_key"` }
Launch plan primary key
type LaunchPlanScheduleType ¶
type LaunchPlanScheduleType string
const ( // LaunchPlanScheduleTypeNONE is the const representing the launch plan does not have a schedule LaunchPlanScheduleTypeNONE LaunchPlanScheduleType = "NONE" // LaunchPlanScheduleTypeCRON is the const representing the launch plan has a CRON type of schedule LaunchPlanScheduleTypeCRON LaunchPlanScheduleType = "CRON" // LaunchPlanScheduleTypeRATE is the launch plan has a RATE type of schedule LaunchPlanScheduleTypeRATE LaunchPlanScheduleType = "RATE" )
type NodeExecution ¶
type NodeExecution struct { BaseModel NodeExecutionKey // Also stored in the closure, but defined as a separate column because it's useful for filtering and sorting. Phase string InputURI string Closure []byte StartedAt *time.Time // Corresponds to the CreatedAt field in the NodeExecution closure // Prefixed with NodeExecution to avoid clashes with gorm.Model CreatedAt NodeExecutionCreatedAt *time.Time // Corresponds to the UpdatedAt field in the NodeExecution closure // Prefixed with NodeExecution to avoid clashes with gorm.Model UpdatedAt NodeExecutionUpdatedAt *time.Time Duration time.Duration NodeExecutionEvents []NodeExecutionEvent // The task execution (if any) which launched this node execution. ParentTaskExecutionID uint `sql:"default:null" gorm:"index"` // The workflow execution (if any) which this node execution launched LaunchedExecution Execution `gorm:"foreignkey:ParentNodeExecutionID"` }
By convention, gorm foreign key references are of the form {ModelName}ID
type NodeExecutionEvent ¶
type NodeExecutionKey ¶
type NodeExecutionKey struct { ExecutionKey NodeID string `gorm:"primary_key;index"` }
type ProjectDomain ¶ added in v0.1.4
type ProjectDomain struct { BaseModel Project string `gorm:"primary_key"` Domain string `gorm:"primary_key"` // Key-value pairs of substitutable resource attributes. Attributes []byte }
Represents project-domain customizable configuration.
type Task ¶
type Task struct { BaseModel TaskKey Closure []byte `gorm:"not null"` // Hash of the compiled task closure Digest []byte }
Database model to encapsulate a task.
type TaskExecution ¶
type TaskExecution struct { BaseModel TaskExecutionKey Phase string PhaseVersion uint32 InputURI string Closure []byte StartedAt *time.Time // Corresponds to the CreatedAt field in the TaskExecution closure // This field is prefixed with TaskExecution because it signifies when // the execution was createdAt, not to be confused with gorm.Model.CreatedAt TaskExecutionCreatedAt *time.Time // Corresponds to the UpdatedAt field in the TaskExecution closure // This field is prefixed with TaskExecution because it signifies when // the execution was UpdatedAt, not to be confused with gorm.Model.UpdatedAt TaskExecutionUpdatedAt *time.Time Duration time.Duration // The child node executions (if any) launched by this task execution. ChildNodeExecution []NodeExecution `gorm:"foreignkey:ParentTaskExecutionID"` }
By convention, gorm foreign key references are of the form {ModelName}ID
type TaskExecutionKey ¶
type TaskExecutionKey struct { TaskKey NodeExecutionKey // *IMPORTANT* This is a pointer to an int in order to allow setting an empty ("0") value according to gorm convention. // Because RetryAttempt is part of the TaskExecution primary key is should *never* be null. RetryAttempt *uint32 `gorm:"primary_key"` }
Task execution primary key
type TaskKey ¶
type TaskKey struct { Project string `gorm:"primary_key;task_project_domain_name_idx,task_project_domain_idx"` Domain string `gorm:"primary_key;index:task_project_domain_name_idx,task_project_domain_idx"` Name string `gorm:"primary_key;index:task_project_domain_name_idx"` Version string `gorm:"primary_key"` }
Task primary key
type Workflow ¶
type Workflow struct { BaseModel WorkflowKey TypedInterface []byte RemoteClosureIdentifier string `gorm:"not null"` LaunchPlans []LaunchPlan Executions []Execution // Hash of the compiled workflow closure Digest []byte }
Database model to encapsulate a workflow.
type WorkflowKey ¶
type WorkflowKey struct { Project string `gorm:"primary_key:workflow_project_domain_name_idx,workflow_project_domain_idx"` Domain string `gorm:"primary_key;index:workflow_project_domain_name_idx,workflow_project_domain_idx"` Name string `gorm:"primary_key;index:workflow_project_domain_name_idx"` Version string `gorm:"primary_key"` }
Workflow primary key