gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/runsc/container/status.go (about)

     1  // Copyright 2018 The gVisor Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package container
    16  
    17  import (
    18  	specs "github.com/opencontainers/runtime-spec/specs-go"
    19  )
    20  
    21  // Status is a local type alias.
    22  type Status = specs.ContainerState
    23  
    24  const (
    25  	// Created indicates "the runtime has finished the create operation and
    26  	// the container process has neither exited nor executed the
    27  	// user-specified program"
    28  	Created = specs.StateCreated
    29  
    30  	// Creating indicates "the container is being created".
    31  	Creating = specs.StateCreating
    32  
    33  	// Running indicates "the container process has executed the
    34  	// user-specified program but has not exited".
    35  	Running = specs.StateRunning
    36  
    37  	// Stopped indicates "the container process has exited".
    38  	Stopped = specs.StateStopped
    39  
    40  	// Paused indicates that the process within the container has been
    41  	// suspended. This is a local status, not part of the spec.
    42  	Paused = Status("paused")
    43  )