github.com/containers/podman/v4@v4.9.4/libpod/define/config.go (about)

     1  package define
     2  
     3  import (
     4  	"bufio"
     5  	"io"
     6  
     7  	"github.com/containers/common/libnetwork/types"
     8  )
     9  
    10  var (
    11  	// DefaultSHMLockPath is the default path for SHM locks
    12  	DefaultSHMLockPath = "/libpod_lock"
    13  	// DefaultRootlessSHMLockPath is the default path for rootless SHM locks
    14  	DefaultRootlessSHMLockPath = "/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 a
    18  	// constant, but Go won't let us do that.
    19  	NameRegex = types.NameRegex
    20  	// RegexError is thrown in presence of an invalid container/pod name.
    21  	RegexError = types.RegexError
    22  )
    23  
    24  const (
    25  	// DefaultTransport is a prefix that we apply to an image name
    26  	// to check docker hub first for the image
    27  	DefaultTransport = "docker://"
    28  )
    29  
    30  // InfoData holds the info type, i.e store, host etc and the data for each type
    31  type InfoData struct {
    32  	Type string
    33  	Data map[string]interface{}
    34  }
    35  
    36  // VolumeDriverLocal is the "local" volume driver. It is managed by libpod
    37  // itself.
    38  const VolumeDriverLocal = "local"
    39  
    40  // VolumeDriverImage is the "image" volume driver. It is managed by Libpod and
    41  // uses volumes backed by an image.
    42  const VolumeDriverImage = "image"
    43  
    44  const (
    45  	OCIManifestDir  = "oci-dir"
    46  	OCIArchive      = "oci-archive"
    47  	V2s2ManifestDir = "docker-dir"
    48  	V2s2Archive     = "docker-archive"
    49  )
    50  
    51  // AttachStreams contains streams that will be attached to the container
    52  type AttachStreams struct {
    53  	// OutputStream will be attached to container's STDOUT
    54  	OutputStream io.Writer
    55  	// ErrorStream will be attached to container's STDERR
    56  	ErrorStream io.Writer
    57  	// InputStream will be attached to container's STDIN
    58  	InputStream *bufio.Reader
    59  	// AttachOutput is whether to attach to STDOUT
    60  	// If false, stdout will not be attached
    61  	AttachOutput bool
    62  	// AttachError is whether to attach to STDERR
    63  	// If false, stdout will not be attached
    64  	AttachError bool
    65  	// AttachInput is whether to attach to STDIN
    66  	// If false, stdout will not be attached
    67  	AttachInput bool
    68  }
    69  
    70  // JournaldLogging is the string conmon expects to specify journald logging
    71  const JournaldLogging = "journald"
    72  
    73  // KubernetesLogging is the string conmon expects when specifying to use the kubernetes logging format
    74  const KubernetesLogging = "k8s-file"
    75  
    76  // JSONLogging is the string conmon expects when specifying to use the json logging format
    77  const JSONLogging = "json-file"
    78  
    79  // NoLogging is the string conmon expects when specifying to use no log driver whatsoever
    80  const NoLogging = "none"
    81  
    82  // PassthroughLogging is the string conmon expects when specifying to use the passthrough driver
    83  const PassthroughLogging = "passthrough"
    84  
    85  // DefaultRlimitValue is the value set by default for nofile and nproc
    86  const RLimitDefaultValue = uint64(1048576)
    87  
    88  // BindMountPrefix distinguishes its annotations from others
    89  const BindMountPrefix = "bind-mount-options"