gitee.com/leisunstar/runtime@v0.0.0-20200521203717-5cef3e7b53f9/virtcontainers/types.go (about) 1 // Copyright (c) 2017 Intel Corporation 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 // 5 6 package virtcontainers 7 8 // ContainerType defines a type of container. 9 type ContainerType string 10 11 // List different types of containers 12 const ( 13 PodContainer ContainerType = "pod_container" 14 PodSandbox ContainerType = "pod_sandbox" 15 UnknownContainerType ContainerType = "unknown_container_type" 16 ) 17 18 // IsSandbox determines if the container type can be considered as a sandbox. 19 // We can consider a sandbox in case we have a PodSandbox or a RegularContainer. 20 func (cType ContainerType) IsSandbox() bool { 21 return cType == PodSandbox 22 }