Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertCreateSpecToUpdateConfig(spec *stateless.CreateSpec) *update.UpdateConfig
- func ConvertJobConfigToJobSpec(config *job.JobConfig) *stateless.JobSpec
- func ConvertJobSpecToJobConfig(spec *stateless.JobSpec) (*job.JobConfig, error)
- func ConvertJobSummary(summary *job.JobSummary, updateInfo *models.UpdateModel) *stateless.JobSummary
- func ConvertLabels(labels []*peloton.Label) []*v1alphapeloton.Label
- func ConvertMesosCommandToPodSpec(commandInfo *mesosv1.CommandInfo, spec *pod.PodSpec, ...)
- func ConvertMesosContainerToPodSpec(containerInfo *mesosv1.ContainerInfo, spec *pod.PodSpec, ...)
- func ConvertMesosExecutorInfoToPodSpec(executorInfo *mesosv1.ExecutorInfo, spec *pod.PodSpec, ...)
- func ConvertPodConstraintsToTaskConstraints(constraints []*pod.Constraint) []*task.Constraint
- func ConvertPodQuerySpecToTaskQuerySpec(spec *pod.QuerySpec) *task.QuerySpec
- func ConvertPodSpecToMesosCommand(spec *pod.PodSpec) *mesosv1.CommandInfo
- func ConvertPodSpecToMesosContainer(spec *pod.PodSpec) *mesosv1.ContainerInfo
- func ConvertPodSpecToMesosExecutorInfo(spec *pod.PodSpec) *mesosv1.ExecutorInfo
- func ConvertPodSpecToTaskConfig(spec *pod.PodSpec) (*task.TaskConfig, error)
- func ConvertPodStateToTaskState(state pod.PodState) task.TaskState
- func ConvertPortConfigsToPortSpecs(ports []*task.PortConfig) []*pod.PortSpec
- func ConvertRuntimeInfoToJobStatus(runtime *job.RuntimeInfo, updateInfo *models.UpdateModel) *stateless.JobStatus
- func ConvertSLAConfigToSLASpec(slaConfig *job.SlaConfig) *stateless.SlaSpec
- func ConvertSLASpecToSLAConfig(slaSpec *stateless.SlaSpec) *job.SlaConfig
- func ConvertStatelessQuerySpecToJobQuerySpec(spec *stateless.QuerySpec) *job.QuerySpec
- func ConvertTaskConfigToPodSpec(taskConfig *task.TaskConfig, jobID string, instanceID uint32) *pod.PodSpec
- func ConvertTaskConstraintsToPodConstraints(constraints []*task.Constraint) []*pod.Constraint
- func ConvertTaskEventsToPodEvents(taskEvents []*task.PodEvent) []*pod.PodEvent
- func ConvertTaskInfosToPodInfos(taskInfos []*task.TaskInfo) []*pod.PodInfo
- func ConvertTaskRuntimeToPodStatus(runtime *task.RuntimeInfo) *pod.PodStatus
- func ConvertTaskStateToPodState(state task.TaskState) pod.PodState
- func ConvertTaskStatsToPodStats(taskStats map[string]uint32) map[string]uint32
- func ConvertUpdateModelToWorkflowInfo(runtime *job.RuntimeInfo, updateInfo *models.UpdateModel, ...) *stateless.WorkflowInfo
- func ConvertUpdateModelToWorkflowStatus(runtime *job.RuntimeInfo, updateInfo *models.UpdateModel) *stateless.WorkflowStatus
- func ConvertUpdateSpecToUpdateConfig(spec *stateless.UpdateSpec) *update.UpdateConfig
- func ConvertV0SecretsToV1Secrets(secrets []*peloton.Secret) []*v1alphapeloton.Secret
- func ConvertV1InstanceRangeToV0InstanceRange(instanceRange []*pod.InstanceIDRange) []*task.InstanceRange
- func ConvertV1SecretsToV0Secrets(secrets []*v1alphapeloton.Secret) []*peloton.Secret
- func FindVolumeInPodSpec(spec *pod.PodSpec, name string) *volume.VolumeSpec
- type Version
Constants ¶
const ( V0 = Version("v0") V1Alpha = Version("v1alpha") V1 = Version("v1") )
These constants are the string representations of the different API versions.
Variables ¶
var ErrInvalidVersion = yarpcerrors.InvalidArgumentErrorf("invalid version")
ErrInvalidVersion is returned when user configures an invalid api version.
Functions ¶
func ConvertCreateSpecToUpdateConfig ¶
func ConvertCreateSpecToUpdateConfig(spec *stateless.CreateSpec) *update.UpdateConfig
ConvertCreateSpecToUpdateConfig converts create spec to update config
func ConvertJobConfigToJobSpec ¶
ConvertJobConfigToJobSpec converts v0 job.JobConfig to v1alpha stateless.JobSpec
func ConvertJobSpecToJobConfig ¶
ConvertJobSpecToJobConfig converts stateless job spec to job config
func ConvertJobSummary ¶
func ConvertJobSummary( summary *job.JobSummary, updateInfo *models.UpdateModel) *stateless.JobSummary
ConvertJobSummary converts v0 job.JobSummary and private UpdateModel to v1alpha stateless.JobSummary
func ConvertLabels ¶
func ConvertLabels(labels []*peloton.Label) []*v1alphapeloton.Label
ConvertLabels converts v0 peloton.Label array to v1alpha peloton.Label array
func ConvertMesosCommandToPodSpec ¶
func ConvertMesosCommandToPodSpec( commandInfo *mesosv1.CommandInfo, spec *pod.PodSpec, container *pod.ContainerSpec, )
ConvertMesosCommandToPodSpec converts the mesos command info to pod spec
func ConvertMesosContainerToPodSpec ¶
func ConvertMesosContainerToPodSpec( containerInfo *mesosv1.ContainerInfo, spec *pod.PodSpec, container *pod.ContainerSpec, )
ConvertMesosContainerToPodSpec converts the mesos container info to PodSpec
func ConvertMesosExecutorInfoToPodSpec ¶
func ConvertMesosExecutorInfoToPodSpec( executorInfo *mesosv1.ExecutorInfo, spec *pod.PodSpec, container *pod.ContainerSpec, )
ConvertMesosExecutorInfoToPodSpec converts mesos executor info to pod spec
func ConvertPodConstraintsToTaskConstraints ¶
func ConvertPodConstraintsToTaskConstraints( constraints []*pod.Constraint, ) []*task.Constraint
ConvertPodConstraintsToTaskConstraints converts pod constraints to task constraints
func ConvertPodQuerySpecToTaskQuerySpec ¶
ConvertPodQuerySpecToTaskQuerySpec converts v1alpha pod.QuerySpec to v0 task.QuerySpec
func ConvertPodSpecToMesosCommand ¶
func ConvertPodSpecToMesosCommand(spec *pod.PodSpec) *mesosv1.CommandInfo
ConvertPodSpecToMesosCommand converts pod spec to mesos command info
func ConvertPodSpecToMesosContainer ¶
func ConvertPodSpecToMesosContainer(spec *pod.PodSpec) *mesosv1.ContainerInfo
ConvertPodSpecToMesosContainer converts pod spec to mesos container info
func ConvertPodSpecToMesosExecutorInfo ¶
func ConvertPodSpecToMesosExecutorInfo(spec *pod.PodSpec) *mesosv1.ExecutorInfo
ConvertPodSpecToMesosExecutorInfo converts pod spec to mesos executor info
func ConvertPodSpecToTaskConfig ¶
func ConvertPodSpecToTaskConfig(spec *pod.PodSpec) (*task.TaskConfig, error)
ConvertPodSpecToTaskConfig converts a pod spec to task config
func ConvertPodStateToTaskState ¶
ConvertPodStateToTaskState converts v0 task.TaskState to v1alpha pod.PodState
func ConvertPortConfigsToPortSpecs ¶
func ConvertPortConfigsToPortSpecs(ports []*task.PortConfig) []*pod.PortSpec
ConvertPortConfigsToPortSpecs converts v0 task.PortConfig array to v1alpha pod.PortSpec array
func ConvertRuntimeInfoToJobStatus ¶
func ConvertRuntimeInfoToJobStatus( runtime *job.RuntimeInfo, updateInfo *models.UpdateModel, ) *stateless.JobStatus
ConvertRuntimeInfoToJobStatus converts v0 job.RuntimeInfo and private UpdateModel to v1alpha stateless.JobStatus
func ConvertSLAConfigToSLASpec ¶
ConvertSLAConfigToSLASpec convert job's sla config to sla spec
func ConvertSLASpecToSLAConfig ¶
ConvertSLASpecToSLAConfig converts job's sla spec to sla config
func ConvertStatelessQuerySpecToJobQuerySpec ¶
ConvertStatelessQuerySpecToJobQuerySpec converts query spec for stateless svc to job query spec
func ConvertTaskConfigToPodSpec ¶
func ConvertTaskConfigToPodSpec(taskConfig *task.TaskConfig, jobID string, instanceID uint32) *pod.PodSpec
ConvertTaskConfigToPodSpec converts v0 task.TaskConfig to v1alpha pod.PodSpec
func ConvertTaskConstraintsToPodConstraints ¶
func ConvertTaskConstraintsToPodConstraints(constraints []*task.Constraint) []*pod.Constraint
ConvertTaskConstraintsToPodConstraints converts v0 task.Constraint array to v1alpha pod.Constraint array
func ConvertTaskEventsToPodEvents ¶
ConvertTaskEventsToPodEvents converts v0 task.PodEvents to v1alpha pod.PodEvents
func ConvertTaskInfosToPodInfos ¶
ConvertTaskInfosToPodInfos converts a list of v0 task info to a list of v1alpha pod info
func ConvertTaskRuntimeToPodStatus ¶
func ConvertTaskRuntimeToPodStatus(runtime *task.RuntimeInfo) *pod.PodStatus
ConvertTaskRuntimeToPodStatus converts v0 task.RuntimeInfo to v1alpha pod.PodStatus
func ConvertTaskStateToPodState ¶
ConvertTaskStateToPodState converts v0 task.TaskState to v1alpha pod.PodState
func ConvertTaskStatsToPodStats ¶
ConvertTaskStatsToPodStats converts v0 task stats to v1alpha pod stats
func ConvertUpdateModelToWorkflowInfo ¶
func ConvertUpdateModelToWorkflowInfo( runtime *job.RuntimeInfo, updateInfo *models.UpdateModel, workflowEvents []*stateless.WorkflowEvent, instanceWorkflowEvents []*stateless.WorkflowInfoInstanceWorkflowEvents, ) *stateless.WorkflowInfo
ConvertUpdateModelToWorkflowInfo converts private UpdateModel to v1alpha stateless.WorkflowInfo
func ConvertUpdateModelToWorkflowStatus ¶
func ConvertUpdateModelToWorkflowStatus( runtime *job.RuntimeInfo, updateInfo *models.UpdateModel, ) *stateless.WorkflowStatus
ConvertUpdateModelToWorkflowStatus converts private UpdateModel to v1alpha stateless.WorkflowStatus
func ConvertUpdateSpecToUpdateConfig ¶
func ConvertUpdateSpecToUpdateConfig(spec *stateless.UpdateSpec) *update.UpdateConfig
ConvertUpdateSpecToUpdateConfig converts update spec to update config
func ConvertV0SecretsToV1Secrets ¶
func ConvertV0SecretsToV1Secrets(secrets []*peloton.Secret) []*v1alphapeloton.Secret
ConvertV0SecretsToV1Secrets converts v0 peloton.Secret to v1alpha peloton.Secret
func ConvertV1InstanceRangeToV0InstanceRange ¶
func ConvertV1InstanceRangeToV0InstanceRange( instanceRange []*pod.InstanceIDRange) []*task.InstanceRange
ConvertV1InstanceRangeToV0InstanceRange converts from array of v1 pod.InstanceIDRange to array of v0 task.InstanceRange
func ConvertV1SecretsToV0Secrets ¶
func ConvertV1SecretsToV0Secrets(secrets []*v1alphapeloton.Secret) []*peloton.Secret
ConvertV1SecretsToV0Secrets converts v1alpha peloton.Secret to v0 peloton.Secret
func FindVolumeInPodSpec ¶
func FindVolumeInPodSpec(spec *pod.PodSpec, name string) *volume.VolumeSpec
FindVolumeInPodSpec finds a volume of given name in the volume spec present in the pod spec
Types ¶
type Version ¶
type Version string
Version is the type of API versions.
func ParseVersion ¶
ParseVersion parses version from string.