package hostedctl // Job states, as stored in jobs.state and shown in JobView.State. Every state // the controller writes is named here; later tasks add theirs here too. const ( // JobWaiting: the launch intent is saved and has no VM Ref yet. Replay // may launch it once its gates pass. JobWaiting = "waiting" // JobStarting: the provider answered the launch; the Ref is saved. JobStarting = "starting" // JobAbandoned: the intent was given up before any VM Ref was saved (a // stop was asked for, or its stop time passed). It is never replayed // again; a VM an earlier lost reply created for it is an orphan for the // reaper. JobAbandoned = "abandoned" ) // Job states that mirror the VM's live state, as Stop and Refresh last read // it from the provider (stop.go, refresh.go), and the one terminal state. const ( JobRunning = "running" JobSuspending = "suspending" JobSuspended = "suspended" JobStopping = "stopping" // JobStopped: the job carries stop proof (stop_proof_json). Nothing // moves it out of this state. JobStopped = "stopped" ) // Job states of the pause barrier and resume (pause.go, resume.go). The // controller sets them and settles them itself; Refresh never overwrites // them, or JobSuspending set by Suspend, with the VM's live state // (mirrorLive). const ( // JobDraining: a pause generation is open; admission is closed until // the VM is suspended or Reopen confirms the runner takes work again. JobDraining = "draining" // JobResuming: a resume operation is prepared (resume_ops pending) and // not yet committed. JobResuming = "resuming" )