Documentation ¶
Index ¶
- Constants
- func GetExperimentTablePrimaryKeyColumn() string
- func GetJobTablePrimaryKeyColumn() string
- func GetNamespaceFromModelResourceReferences(resourceRefs []*ResourceReference) string
- func GetPipelineTablePrimaryKeyColumn() string
- func GetRunTablePrimaryKeyColumn() string
- type CronSchedule
- type DBStatus
- type DefaultExperiment
- type Experiment
- func (e *Experiment) APIToModelFieldMap() map[string]string
- func (e *Experiment) DefaultSortField() string
- func (e *Experiment) GetField(name string) (string, bool)
- func (e *Experiment) GetFieldValue(name string) interface{}
- func (e *Experiment) GetKeyFieldPrefix() string
- func (e *Experiment) GetModelName() string
- func (e *Experiment) GetSortByFieldPrefix(name string) string
- func (e Experiment) GetValueOfPrimaryKey() string
- func (e *Experiment) PrimaryKeyColumnName() string
- type Job
- func (k *Job) APIToModelFieldMap() map[string]string
- func (j *Job) DefaultSortField() string
- func (j *Job) GetField(name string) (string, bool)
- func (j *Job) GetFieldValue(name string) interface{}
- func (j *Job) GetKeyFieldPrefix() string
- func (j *Job) GetModelName() string
- func (j *Job) GetSortByFieldPrefix(name string) string
- func (j Job) GetValueOfPrimaryKey() string
- func (j *Job) PrimaryKeyColumnName() string
- type ListableDataModel
- type PeriodicSchedule
- type Pipeline
- func (p *Pipeline) APIToModelFieldMap() map[string]string
- func (p *Pipeline) DefaultSortField() string
- func (p *Pipeline) GetField(name string) (string, bool)
- func (p *Pipeline) GetFieldValue(name string) interface{}
- func (p *Pipeline) GetKeyFieldPrefix() string
- func (p *Pipeline) GetModelName() string
- func (p *Pipeline) GetSortByFieldPrefix(name string) string
- func (p Pipeline) GetValueOfPrimaryKey() string
- func (p *Pipeline) PrimaryKeyColumnName() string
- type PipelineRuntime
- type PipelineSpec
- type PipelineStatus
- type PipelineVersion
- func (p *PipelineVersion) APIToModelFieldMap() map[string]string
- func (p *PipelineVersion) DefaultSortField() string
- func (p *PipelineVersion) GetField(name string) (string, bool)
- func (p *PipelineVersion) GetFieldValue(name string) interface{}
- func (p *PipelineVersion) GetKeyFieldPrefix() string
- func (p *PipelineVersion) GetModelName() string
- func (p *PipelineVersion) GetSortByFieldPrefix(name string) string
- func (p PipelineVersion) GetValueOfPrimaryKey() string
- func (p *PipelineVersion) PrimaryKeyColumnName() string
- type PipelineVersionStatus
- type ResourceReference
- type Run
- func (r *Run) APIToModelFieldMap() map[string]string
- func (r *Run) DefaultSortField() string
- func (r *Run) GetField(name string) (string, bool)
- func (r *Run) GetFieldValue(name string) interface{}
- func (r *Run) GetKeyFieldPrefix() string
- func (r *Run) GetModelName() string
- func (r *Run) GetSortByFieldPrefix(name string) string
- func (r Run) GetValueOfPrimaryKey() string
- func (r *Run) IsRegularField(name string) bool
- func (r *Run) PrimaryKeyColumnName() string
- type RunDetail
- type RunMetric
- type Task
- func (t Task) APIToModelFieldMap() map[string]string
- func (t Task) DefaultSortField() string
- func (t Task) GetField(name string) (string, bool)
- func (t Task) GetFieldValue(name string) interface{}
- func (t Task) GetKeyFieldPrefix() string
- func (t Task) GetModelName() string
- func (t Task) GetSortByFieldPrefix(s string) string
- func (t Task) PrimaryKeyColumnName() string
- type Trigger
Constants ¶
const (
RunTerminatingConditions string = "Terminating"
)
Variables ¶
This section is empty.
Functions ¶
func GetExperimentTablePrimaryKeyColumn ¶
func GetExperimentTablePrimaryKeyColumn() string
func GetJobTablePrimaryKeyColumn ¶
func GetJobTablePrimaryKeyColumn() string
func GetNamespaceFromModelResourceReferences ¶
func GetNamespaceFromModelResourceReferences(resourceRefs []*ResourceReference) string
func GetPipelineTablePrimaryKeyColumn ¶
func GetPipelineTablePrimaryKeyColumn() string
func GetRunTablePrimaryKeyColumn ¶
func GetRunTablePrimaryKeyColumn() string
Types ¶
type CronSchedule ¶
type CronSchedule struct { // Time at which scheduling starts. // If no start time is specified, the StartTime is the creation time of the schedule. CronScheduleStartTimeInSec *int64 `gorm:"column:CronScheduleStartTimeInSec;"` // Time at which scheduling ends. // If no end time is specified, the EndTime is the end of time. CronScheduleEndTimeInSec *int64 `gorm:"column:CronScheduleEndTimeInSec;"` // Cron string describing when a workflow should be created within the // time interval defined by StartTime and EndTime. Cron *string `gorm:"column:Schedule;"` }
type DBStatus ¶
type DBStatus struct {
HaveSamplesLoaded bool `gorm:"column:HaveSamplesLoaded; not null"`
}
type DefaultExperiment ¶
type DefaultExperiment struct {
DefaultExperimentId string `gorm:"column:DefaultExperimentId; not null"`
}
type Experiment ¶
type Experiment struct { UUID string `gorm:"column:UUID; not null; primary_key"` Name string `gorm:"column:Name; not null; unique_index:idx_name_namespace"` Description string `gorm:"column:Description; not null"` CreatedAtInSec int64 `gorm:"column:CreatedAtInSec; not null"` Namespace string `gorm:"column:Namespace; not null; unique_index:idx_name_namespace"` StorageState string `gorm:"column:StorageState; not null;"` }
func (*Experiment) APIToModelFieldMap ¶
func (e *Experiment) APIToModelFieldMap() map[string]string
APIToModelFieldMap returns a map from API names to field names for model Experiment.
func (*Experiment) DefaultSortField ¶
func (e *Experiment) DefaultSortField() string
DefaultSortField returns the default sorting field for model Experiment.
func (*Experiment) GetFieldValue ¶
func (e *Experiment) GetFieldValue(name string) interface{}
func (*Experiment) GetKeyFieldPrefix ¶
func (e *Experiment) GetKeyFieldPrefix() string
func (*Experiment) GetModelName ¶
func (e *Experiment) GetModelName() string
GetModelName returns table name used as sort field prefix
func (*Experiment) GetSortByFieldPrefix ¶
func (e *Experiment) GetSortByFieldPrefix(name string) string
func (Experiment) GetValueOfPrimaryKey ¶
func (e Experiment) GetValueOfPrimaryKey() string
func (*Experiment) PrimaryKeyColumnName ¶
func (e *Experiment) PrimaryKeyColumnName() string
PrimaryKeyColumnName returns the primary key for model Experiment.
type Job ¶
type Job struct { UUID string `gorm:"column:UUID; not null; primary_key"` DisplayName string `gorm:"column:DisplayName; not null;"` /* The name that user provides. Can contain special characters*/ Name string `gorm:"column:Name; not null;"` /* The name of the K8s resource. Follow regex '[a-z0-9]([-a-z0-9]*[a-z0-9])?'*/ Namespace string `gorm:"column:Namespace; not null;"` ServiceAccount string `gorm:"column:ServiceAccount; not null;"` Description string `gorm:"column:Description; not null"` MaxConcurrency int64 `gorm:"column:MaxConcurrency;not null"` NoCatchup bool `gorm:"column:NoCatchup; not null"` CreatedAtInSec int64 `gorm:"column:CreatedAtInSec; not null"` /* The time this record is stored in DB*/ UpdatedAtInSec int64 `gorm:"column:UpdatedAtInSec; not null"` Enabled bool `gorm:"column:Enabled; not null"` ResourceReferences []*ResourceReference Trigger PipelineSpec Conditions string `gorm:"column:Conditions; not null"` }
func (*Job) APIToModelFieldMap ¶
APIToModelFieldMap returns a map from API names to field names for model Job.
func (*Job) DefaultSortField ¶
DefaultSortField returns the default sorting field for model Job.
func (*Job) GetFieldValue ¶
func (*Job) GetKeyFieldPrefix ¶
func (*Job) GetModelName ¶
GetModelName returns table name used as sort field prefix
func (*Job) GetSortByFieldPrefix ¶
func (Job) GetValueOfPrimaryKey ¶
func (*Job) PrimaryKeyColumnName ¶
PrimaryKeyColumnName returns the primary key for model Job.
type ListableDataModel ¶
type ListableDataModel interface { // Get the value of the key field. GetValueOfPrimaryKey() string }
The data model that supports List APIs.
type PeriodicSchedule ¶
type PeriodicSchedule struct { // Time at which scheduling starts. // If no start time is specified, the StartTime is the creation time of the schedule. PeriodicScheduleStartTimeInSec *int64 `gorm:"column:PeriodicScheduleStartTimeInSec;"` // Time at which scheduling ends. // If no end time is specified, the EndTime is the end of time. PeriodicScheduleEndTimeInSec *int64 `gorm:"column:PeriodicScheduleEndTimeInSec;"` // Interval describing when a workflow should be created within the // time interval defined by StartTime and EndTime. IntervalSecond *int64 `gorm:"column:IntervalSecond;"` }
type Pipeline ¶
type Pipeline struct { UUID string `gorm:"column:UUID; not null; primary_key"` CreatedAtInSec int64 `gorm:"column:CreatedAtInSec; not null"` Name string `gorm:"column:Name; not null"` Description string `gorm:"column:Description; not null; size:65535"` // Same as below, set size to large number so it will be stored as longtext // TODO(jingzhang36): remove Parameters when no code is accessing this // field. Should use PipelineVersion.Parameters instead. /* Set size to 65535 so it will be stored as longtext. https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html */ Parameters string `gorm:"column:Parameters; not null; size:65535"` Status PipelineStatus `gorm:"column:Status; not null"` // Default version of this pipeline. It could be null. DefaultVersionId string `gorm:"column:DefaultVersionId;"` DefaultVersion *PipelineVersion `gorm:"-"` Namespace string `gorm:"column:Namespace; size:63; default:''"` }
func (*Pipeline) APIToModelFieldMap ¶
APIToModelFieldMap returns a map from API names to field names for model Pipeline.
func (*Pipeline) DefaultSortField ¶
DefaultSortField returns the default sorting field for model Pipeline.
func (*Pipeline) GetFieldValue ¶
func (*Pipeline) GetKeyFieldPrefix ¶
func (*Pipeline) GetModelName ¶
GetModelName returns table name used as sort field prefix
func (*Pipeline) GetSortByFieldPrefix ¶
func (Pipeline) GetValueOfPrimaryKey ¶
func (*Pipeline) PrimaryKeyColumnName ¶
PrimaryKeyColumnName returns the primary key for model Pipeline.
type PipelineRuntime ¶
type PipelineRuntime struct { PipelineRuntimeManifest string `gorm:"column:PipelineRuntimeManifest; not null; size:65535"` /* Argo CRD. Set size to 65535 so it will be stored as longtext. https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html */ WorkflowRuntimeManifest string `gorm:"column:WorkflowRuntimeManifest; not null; size:65535"` }
type PipelineSpec ¶
type PipelineSpec struct { // Pipeline ID will be optional. It's available only if the resource is created through // a pipeline ID. PipelineId string `gorm:"column:PipelineId; not null"` // Pipeline Name will be required if ID is not empty. PipelineName string `gorm:"column:PipelineName; not null"` // Pipeline YAML definition. This is the pipeline interface for creating a pipeline. // Set size to 65535 so it will be stored as longtext. // https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html PipelineSpecManifest string `gorm:"column:PipelineSpecManifest; size:65535"` // Argo workflow YAML definition. This is the Argo Spec converted from Pipeline YAML. WorkflowSpecManifest string `gorm:"column:WorkflowSpecManifest; not null; size:65535"` // Store parameters key-value pairs as serialized string. Parameters string `gorm:"column:Parameters; size:65535"` }
type PipelineStatus ¶
type PipelineStatus string
PipelineStatus a label for the status of the Pipeline. This is intend to make pipeline creation and deletion atomic.
const ( PipelineCreating PipelineStatus = "CREATING" PipelineReady PipelineStatus = "READY" PipelineDeleting PipelineStatus = "DELETING" )
type PipelineVersion ¶
type PipelineVersion struct { UUID string `gorm:"column:UUID; not null; primary_key"` CreatedAtInSec int64 `gorm:"column:CreatedAtInSec; not null; index"` Name string `gorm:"column:Name; not null; unique_index:idx_pipelineid_name"` // Set size to 65535 so it will be stored as longtext. // https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html Parameters string `gorm:"column:Parameters; not null; size:65535"` // PipelineVersion belongs to Pipeline. If a pipeline with a specific UUID // is deleted from Pipeline table, all this pipeline's versions will be // deleted from PipelineVersion table. PipelineId string `gorm:"column:PipelineId; not null;index; unique_index:idx_pipelineid_name"` Status PipelineVersionStatus `gorm:"column:Status; not null"` // Code source url links to the pipeline version's definition in repo. CodeSourceUrl string `gorm:"column:CodeSourceUrl;"` }
func (*PipelineVersion) APIToModelFieldMap ¶
func (p *PipelineVersion) APIToModelFieldMap() map[string]string
APIToModelFieldMap returns a map from API names to field names for model PipelineVersion.
func (*PipelineVersion) DefaultSortField ¶
func (p *PipelineVersion) DefaultSortField() string
DefaultSortField returns the default sorting field for model Pipeline.
func (*PipelineVersion) GetFieldValue ¶
func (p *PipelineVersion) GetFieldValue(name string) interface{}
func (*PipelineVersion) GetKeyFieldPrefix ¶
func (p *PipelineVersion) GetKeyFieldPrefix() string
func (*PipelineVersion) GetModelName ¶
func (p *PipelineVersion) GetModelName() string
GetModelName returns table name used as sort field prefix
func (*PipelineVersion) GetSortByFieldPrefix ¶
func (p *PipelineVersion) GetSortByFieldPrefix(name string) string
func (PipelineVersion) GetValueOfPrimaryKey ¶
func (p PipelineVersion) GetValueOfPrimaryKey() string
func (*PipelineVersion) PrimaryKeyColumnName ¶
func (p *PipelineVersion) PrimaryKeyColumnName() string
PrimaryKeyColumnName returns the primary key for model PipelineVersion.
type PipelineVersionStatus ¶
type PipelineVersionStatus string
PipelineVersionStatus a label for the status of the Pipeline. This is intend to make pipeline creation and deletion atomic.
const ( PipelineVersionCreating PipelineVersionStatus = "CREATING" PipelineVersionReady PipelineVersionStatus = "READY" PipelineVersionDeleting PipelineVersionStatus = "DELETING" )
type ResourceReference ¶
type ResourceReference struct { // ID of the resource object ResourceUUID string `gorm:"column:ResourceUUID; not null; primary_key"` // The type of the resource object ResourceType common.ResourceType `gorm:"column:ResourceType; not null; primary_key; index:referencefilter"` // The ID of the resource that been referenced to. ReferenceUUID string `gorm:"column:ReferenceUUID; not null; index:referencefilter"` // The name of the resource that been referenced to. ReferenceName string `gorm:"column:ReferenceName; not null; "` // The type of the resource that been referenced to. ReferenceType common.ResourceType `gorm:"column:ReferenceType; not null; primary_key; index:referencefilter"` // The relationship between the resource object and the resource that been referenced to. Relationship common.Relationship `gorm:"column:Relationship; not null; "` // The json formatted blob of the resource reference. Payload string `gorm:"column:Payload; not null; size:65535 "` }
Resource reference table models the relationship between resources in a loosely coupled way.
type Run ¶
type Run struct { UUID string `gorm:"column:UUID; not null; primary_key"` ExperimentUUID string `gorm:"column:ExperimentUUID; not null;"` DisplayName string `gorm:"column:DisplayName; not null;"` /* The name that user provides. Can contain special characters*/ Name string `gorm:"column:Name; not null;"` /* The name of the K8s resource. Follow regex '[a-z0-9]([-a-z0-9]*[a-z0-9])?'*/ StorageState string `gorm:"column:StorageState; not null;"` Namespace string `gorm:"column:Namespace; not null;"` ServiceAccount string `gorm:"column:ServiceAccount; not null;"` Description string `gorm:"column:Description; not null;"` CreatedAtInSec int64 `gorm:"column:CreatedAtInSec; not null;"` ScheduledAtInSec int64 `gorm:"column:ScheduledAtInSec; default:0;"` FinishedAtInSec int64 `gorm:"column:FinishedAtInSec; default:0;"` Conditions string `gorm:"column:Conditions; not null"` Metrics []*RunMetric ResourceReferences []*ResourceReference PipelineSpec }
func (*Run) APIToModelFieldMap ¶
APIToModelFieldMap returns a map from API names to field names for model Run.
func (*Run) DefaultSortField ¶
DefaultSortField returns the default sorting field for model Run.
func (*Run) GetFieldValue ¶
func (*Run) GetKeyFieldPrefix ¶
func (*Run) GetModelName ¶
GetModelName returns table name used as sort field prefix
func (*Run) GetSortByFieldPrefix ¶
func (Run) GetValueOfPrimaryKey ¶
func (*Run) IsRegularField ¶
Regular fields are the fields that are mapped to columns in Run table. Non-regular fields are the run metrics for now. Could have other non-regular sorting fields later.
func (*Run) PrimaryKeyColumnName ¶
PrimaryKeyColumnName returns the primary key for model Run.
type RunDetail ¶
type RunDetail struct { Run PipelineRuntime }
type RunMetric ¶
type RunMetric struct { RunUUID string `gorm:"column:RunUUID; not null;primary_key"` NodeID string `gorm:"column:NodeID; not null; primary_key"` Name string `gorm:"column:Name; not null;primary_key"` NumberValue float64 `gorm:"column:NumberValue"` Format string `gorm:"column:Format"` Payload string `gorm:"column:Payload; not null; size:65535"` }
type Task ¶
type Task struct { UUID string `gorm:"column:UUID; not null; primary_key"` Namespace string `gorm:"column:Namespace; not null;"` PipelineName string `gorm:"column:PipelineName; not null;"` RunUUID string `gorm:"column:RunUUID; not null;"` MLMDExecutionID string `gorm:"column:MLMDExecutionID; not null;"` CreatedTimestamp int64 `gorm:"column:CreatedTimestamp; not null"` FinishedTimestamp int64 `gorm:"column:FinishedTimestamp"` Fingerprint string `gorm:"column:Fingerprint; not null;"` }
func (Task) APIToModelFieldMap ¶
func (Task) DefaultSortField ¶
func (Task) GetFieldValue ¶
func (Task) GetKeyFieldPrefix ¶
func (Task) GetModelName ¶
func (Task) GetSortByFieldPrefix ¶
func (Task) PrimaryKeyColumnName ¶
type Trigger ¶
type Trigger struct { // Create workflows according to a cron schedule. CronSchedule // Create workflows periodically. PeriodicSchedule }
Trigger specifies when to create a new workflow.