mirror of
https://github.com/containers/podman.git
synced 2025-11-14 01:57:58 +08:00
[NO TESTS NEEDED] Vendor in containers/buildah v1.20.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
32
vendor/github.com/containers/buildah/define/isolation.go
generated
vendored
Normal file
32
vendor/github.com/containers/buildah/define/isolation.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package define
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type Isolation int
|
||||
|
||||
const (
|
||||
// IsolationDefault is whatever we think will work best.
|
||||
IsolationDefault Isolation = iota
|
||||
// IsolationOCI is a proper OCI runtime.
|
||||
IsolationOCI
|
||||
// IsolationChroot is a more chroot-like environment: less isolation,
|
||||
// but with fewer requirements.
|
||||
IsolationChroot
|
||||
// IsolationOCIRootless is a proper OCI runtime in rootless mode.
|
||||
IsolationOCIRootless
|
||||
)
|
||||
|
||||
// String converts a Isolation into a string.
|
||||
func (i Isolation) String() string {
|
||||
switch i {
|
||||
case IsolationDefault, IsolationOCI:
|
||||
return "oci"
|
||||
case IsolationChroot:
|
||||
return "chroot"
|
||||
case IsolationOCIRootless:
|
||||
return "rootless"
|
||||
}
|
||||
return fmt.Sprintf("unrecognized isolation type %d", i)
|
||||
}
|
||||
Reference in New Issue
Block a user