Documentation
¶
Index ¶
- Variables
- func DeleteJobMetrics(jobName, queueName string)
- func TotalTaskMinAvailable(job *vcbatch.Job) int32
- func TotalTasks(job *vcbatch.Job) int32
- func UpdateJobCompleted(jobName, queueName string)
- func UpdateJobFailed(jobName, queueName string)
- type Action
- type ActionFn
- type KillActionFn
- type KillTargetFn
- type PhaseMap
- type State
- type Target
- type TargetType
- type UpdateStatusFn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SyncJob will create or delete Pods according to Job's spec. SyncJob ActionFn // KillJob kill all Pods of Job with phase not in podRetainPhase. KillJob KillActionFn // KillTarget kill the target with given name. KillTarget KillTargetFn )
View Source
var PodRetainPhaseNone = PhaseMap{}
PodRetainPhaseNone stores no phase.
View Source
var PodRetainPhaseSoft = PhaseMap{ v1.PodSucceeded: {}, v1.PodFailed: {}, }
PodRetainPhaseSoft stores PodSucceeded and PodFailed Phase.
Functions ¶
func DeleteJobMetrics ¶ added in v1.11.0
func DeleteJobMetrics(jobName, queueName string)
func TotalTaskMinAvailable ¶ added in v1.3.0
TotalTaskMinAvailable returns the sum of task minAvailable
func TotalTasks ¶
TotalTasks returns number of tasks in a given volcano job.
func UpdateJobCompleted ¶ added in v1.11.0
func UpdateJobCompleted(jobName, queueName string)
func UpdateJobFailed ¶ added in v1.11.0
func UpdateJobFailed(jobName, queueName string)
Types ¶
type ActionFn ¶
type ActionFn func(job *apis.JobInfo, fn UpdateStatusFn) error
ActionFn will create or delete Pods according to Job's spec.
type KillActionFn ¶
type KillActionFn func(job *apis.JobInfo, podRetainPhase PhaseMap, fn UpdateStatusFn) error
KillActionFn kill all Pods of Job with phase not in podRetainPhase.
type KillTargetFn ¶ added in v1.11.0
type KillTargetFn func(job *apis.JobInfo, target Target, fn UpdateStatusFn) error
KillPodFn kill the Task with given name.
type State ¶
type State interface { // Execute executes the actions based on current state. Execute(act Action) error }
State interface.
type Target ¶ added in v1.11.0
type Target struct { TaskName string PodName string Type TargetType }
type TargetType ¶ added in v1.11.0
type TargetType string
const ( TargetTypeTask TargetType = "task" TargetTypePod TargetType = "pod" )
type UpdateStatusFn ¶
UpdateStatusFn updates the job status.
Click to show internal directories.
Click to hide internal directories.