podman
1package define2
3import (4"bufio"5"io"6
7"github.com/containers/common/libnetwork/types"8)
9
10var (11// DefaultSHMLockPath is the default path for SHM locks12DefaultSHMLockPath = "/libpod_lock"13// DefaultRootlessSHMLockPath is the default path for rootless SHM locks14DefaultRootlessSHMLockPath = "/libpod_rootless_lock"15
16// NameRegex is a regular expression to validate container/pod names.17// This must NOT be changed from outside of Libpod. It should be a18// constant, but Go won't let us do that.19NameRegex = types.NameRegex20// RegexError is thrown in presence of an invalid container/pod name.21RegexError = types.RegexError22)
23
24const (25// DefaultTransport is a prefix that we apply to an image name26// to check docker hub first for the image27DefaultTransport = "docker://"28)
29
30// InfoData holds the info type, i.e store, host etc and the data for each type
31type InfoData struct {32Type string33Data map[string]interface{}34}
35
36// VolumeDriverLocal is the "local" volume driver. It is managed by libpod
37// itself.
38const VolumeDriverLocal = "local"39
40// VolumeDriverImage is the "image" volume driver. It is managed by Libpod and
41// uses volumes backed by an image.
42const VolumeDriverImage = "image"43
44const (45OCIManifestDir = "oci-dir"46OCIArchive = "oci-archive"47V2s2ManifestDir = "docker-dir"48V2s2Archive = "docker-archive"49)
50
51// AttachStreams contains streams that will be attached to the container
52type AttachStreams struct {53// OutputStream will be attached to container's STDOUT54OutputStream io.Writer55// ErrorStream will be attached to container's STDERR56ErrorStream io.Writer57// InputStream will be attached to container's STDIN58InputStream *bufio.Reader59// AttachOutput is whether to attach to STDOUT60// If false, stdout will not be attached61AttachOutput bool62// AttachError is whether to attach to STDERR63// If false, stdout will not be attached64AttachError bool65// AttachInput is whether to attach to STDIN66// If false, stdout will not be attached67AttachInput bool68}
69
70// JournaldLogging is the string conmon expects to specify journald logging
71const JournaldLogging = "journald"72
73// KubernetesLogging is the string conmon expects when specifying to use the kubernetes logging format
74const KubernetesLogging = "k8s-file"75
76// JSONLogging is the string conmon expects when specifying to use the json logging format
77const JSONLogging = "json-file"78
79// NoLogging is the string conmon expects when specifying to use no log driver whatsoever
80const NoLogging = "none"81
82// PassthroughLogging is the string conmon expects when specifying to use the passthrough driver
83const PassthroughLogging = "passthrough"84
85// PassthroughTTYLogging is the string conmon expects when specifying to use the passthrough driver even on a tty.
86const PassthroughTTYLogging = "passthrough-tty"87
88// DefaultRlimitValue is the value set by default for nofile and nproc
89const RLimitDefaultValue = uint64(1048576)90
91// BindMountPrefix distinguishes its annotations from others
92const BindMountPrefix = "bind-mount-options"93