legacy

package
v1.1.5-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromLegacyJob

func FromLegacyJob(legacy *model.Job) (*models.Job, error)

FromLegacyJob converts legacy job sped to current

func FromLegacyJobHistoryType

func FromLegacyJobHistoryType(historyType model.JobHistoryType) models.JobHistoryType

func FromLegacyJobSpec

func FromLegacyJobSpec(legacy model.Spec) (*models.Task, error)

func FromLegacyJobStateType

func FromLegacyJobStateType(legacy model.JobStateType) models.JobStateType

func FromLegacyNetworkConfig

func FromLegacyNetworkConfig(legacy model.NetworkConfig) (*models.NetworkConfig, error)

func FromLegacyResourceUsageConfig

func FromLegacyResourceUsageConfig(legacy model.ResourceUsageConfig) models.ResourcesConfig

func FromLegacyStorageSpec

func FromLegacyStorageSpec(legacy model.StorageSpec) (*models.SpecConfig, error)

func FromLegacyStorageSpecToInputSource

func FromLegacyStorageSpecToInputSource(spec model.StorageSpec) (*models.InputSource, error)

func GetJob

func GetJob(ctx context.Context, jobStore jobstore.Store, jobID string) (model.Job, error)

func GetJobState

func GetJobState(ctx context.Context, jobStore jobstore.Store, jobID string) (model.JobState, error)

GetJobState is a helper function that returns the job state for a given job ID

func NewStateResolver

func NewStateResolver(jobStore jobstore.Store) *job.StateResolver

func ToLegacyExecutionState

func ToLegacyExecutionState(execution *models.Execution) (*model.ExecutionState, error)

func ToLegacyExecutionStateType

func ToLegacyExecutionStateType(state models.ExecutionStateType) model.ExecutionStateType

func ToLegacyJob

func ToLegacyJob(job *models.Job) (*model.Job, error)

func ToLegacyJobHistory

func ToLegacyJobHistory(history *models.JobHistory) *model.JobHistory

ToLegacyJobHistory converts a models.JobHistory to a model.JobHistory

func ToLegacyJobHistoryType

func ToLegacyJobHistoryType(historyType models.JobHistoryType) model.JobHistoryType

func ToLegacyJobSpec

func ToLegacyJobSpec(job *models.Job) (*model.Spec, error)

func ToLegacyJobStateType

func ToLegacyJobStateType(state models.JobStateType) model.JobStateType

func ToLegacyJobStatus

func ToLegacyJobStatus(job models.Job, executions []models.Execution) (*model.JobState, error)

func ToLegacyNetworkConfig

func ToLegacyNetworkConfig(network *models.NetworkConfig) (model.NetworkConfig, error)

func ToLegacyNodeSelectors

func ToLegacyNodeSelectors(constraints []*models.LabelSelectorRequirement) []model.LabelSelectorRequirement

func ToLegacyRunCommandResult

func ToLegacyRunCommandResult(result *models.RunCommandResult) *model.RunCommandResult

ToLegacyRunCommandResult converts a models.RunCommandResult to a model.RunCommandResult

func ToLegacyStateChange

func ToLegacyStateChange[From any, To any](state *models.StateChange[From], converter func(From) To) *model.StateChange[To]

func ToLegacyStorageSpec

func ToLegacyStorageSpec(storage *models.SpecConfig) (model.StorageSpec, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL