Documentation ¶
Overview ¶
Package common defines values shared by different parts of rkt (e.g. stage0 and stage1)
Index ¶
- Constants
- func AppImageManifestPath(root string, appName types.ACName) string
- func AppInfoPath(root string, appName types.ACName) string
- func AppPath(root string, appName types.ACName) string
- func AppRootfsPath(root string, appName types.ACName) string
- func AppTreeStoreIDPath(root string, appName types.ACName) string
- func AppsInfoPath(root string) string
- func AppsPath(root string) string
- func GetRktLockFD() (int, error)
- func ImageManifestPath(root string, appName types.ACName) string
- func LookupGid(groupName string) (gid int, err error)
- func LookupPath(bin string, paths string) (string, error)
- func MetadataServicePublicURL(ip net.IP, token string) string
- func PathSupportsOverlay(path string) error
- func PodManifestPath(root string) string
- func RelAppPath(appName types.ACName) string
- func RelAppRootfsPath(appName types.ACName) string
- func RemoveEmptyLines(str string) []string
- func SharedVolumesPath(root string) string
- func SliceToPath(unit string) (string, error)
- func Stage1ImagePath(root string) string
- func Stage1ManifestPath(root string) string
- func Stage1RootfsPath(root string) string
- func SupportsOverlay() error
- func SupportsUserNS() bool
- func SystemdVersion(systemdBinaryPath string) (int, error)
- type ErrOverlayUnsupported
- type NetList
- func (l *NetList) All() bool
- func (l *NetList) Contained() bool
- func (l *NetList) Host() bool
- func (l *NetList) None() bool
- func (l *NetList) Set(value string) error
- func (l *NetList) Specific(net string) bool
- func (l *NetList) SpecificArgs(net string) string
- func (l *NetList) String() string
- func (l *NetList) Strings() []string
- func (l *NetList) StringsOnlyNames() (list []string)
- func (l *NetList) Type() string
Constants ¶
const ( AppsInfoDir = "/appsinfo" EnvLockFd = "RKT_LOCK_FD" EnvSELinuxContext = "RKT_SELINUX_CONTEXT" EnvSELinuxMountContext = "RKT_SELINUX_MOUNT_CONTEXT" Stage1TreeStoreIDFilename = "stage1TreeStoreID" AppTreeStoreIDFilename = "treeStoreID" OverlayPreparedFilename = "overlay-prepared" PrivateUsersPreparedFilename = "private-users-prepared" PrepareLock = "prepareLock" MetadataServicePort = 18112 MetadataServiceRegSock = "/run/rkt/metadata-svc.sock" APIServiceListenAddr = "localhost:15441" DefaultLocalConfigDir = "/etc/rkt" DefaultSystemConfigDir = "/usr/lib/rkt" // Default perm bits for the regular files // within the stage1 directory. (e.g. image manifest, // pod manifest, stage1ID, etc). DefaultRegularFilePerm = os.FileMode(0640) // Default perm bits for the regular directories // within the stage1 directory. DefaultRegularDirPerm = os.FileMode(0750) )
const ( FsMagicAUFS = 0x61756673 // https://goo.gl/CBwx43 FsMagicZFS = 0x2FC12FC1 // https://goo.gl/xTvzO5 )
const ( RktGroup = "rkt" // owns /var/lib/rkt RktAdminGroup = "rkt-admin" // owns /etc/rkt )
Variables ¶
This section is empty.
Functions ¶
func AppImageManifestPath ¶ added in v0.15.0
AppImageManifestPath returns the path to the app's ImageManifest file
func AppInfoPath ¶ added in v0.9.0
AppInfoPath returns the path to the app's appsinfo directory of a pod.
func AppRootfsPath ¶
AppRootfsPath returns the path to an app's rootfs.
func AppTreeStoreIDPath ¶ added in v0.9.0
AppTreeStoreIDPath returns the path to the app's treeStoreID file of a pod.
func AppsInfoPath ¶ added in v0.9.0
AppsInfoPath returns the path to the appsinfo directory of a pod.
func GetRktLockFD ¶ added in v0.5.1
func ImageManifestPath ¶
ImageManifestPath returns the path to the app's manifest file of a pod.
func LookupGid ¶ added in v0.9.0
LookupGid reads the group file and returns the gid of the group specified by groupName.
func LookupPath ¶ added in v1.1.0
LookupPath search for bin in paths. If found, it returns its absolute path, if not, an error
func MetadataServicePublicURL ¶ added in v0.4.0
MetadataServicePublicURL returns the public URL used to host the metadata service
func PathSupportsOverlay ¶ added in v1.14.0
PathSupportsOverlay checks whether the given path is compatible with OverlayFS. This method also calls SupportsOverlay().
It returns an instance of ErrOverlayUnsupported if OverlayFS is not supported or any other error if determining overlay support failed.
func PodManifestPath ¶ added in v0.5.1
PodManifestPath returns the path in root to the Pod Manifest
func RelAppPath ¶ added in v0.8.0
RelAppPath returns the path of an app relative to the stage1 chroot.
func RelAppRootfsPath ¶
RelAppRootfsPath returns the path of an app's rootfs relative to the stage1 chroot.
func RemoveEmptyLines ¶ added in v1.12.0
RemoveEmptyLines removes empty lines from the given string and breaks it up into a list of strings at newline characters
func SharedVolumesPath ¶ added in v0.9.0
SharedVolumesPath returns the path to the shared (empty) volumes of a pod.
func SliceToPath ¶ added in v0.6.1
SliceToPath explodes a slice name to its corresponding path in the cgroup hierarchy. For example, a slice named "foo-bar-baz.slice" corresponds to the path "foo.slice/foo-bar.slice/foo-bar-baz.slice". See systemd.slice(5)
func Stage1ImagePath ¶
Stage1ImagePath returns the path where the stage1 app image (unpacked ACI) is rooted, (i.e. where its contents are extracted during stage0).
func Stage1ManifestPath ¶
Stage1ManifestPath returns the path to the stage1's manifest file inside the expanded ACI.
func Stage1RootfsPath ¶
Stage1RootfsPath returns the path to the stage1 rootfs
func SupportsOverlay ¶ added in v0.5.2
func SupportsOverlay() error
SupportsOverlay returns whether the operating system generally supports OverlayFS, returning an instance of ErrOverlayUnsupported which encodes the reason. It is sufficient to check for nil if the reason is not of interest.
func SupportsUserNS ¶ added in v0.8.0
func SupportsUserNS() bool
SupportsUserNS returns whether the kernel has CONFIG_USER_NS set
func SystemdVersion ¶ added in v1.1.0
SystemdVersion parses and returns the version of a given systemd binary
Types ¶
type ErrOverlayUnsupported ¶ added in v1.14.0
type ErrOverlayUnsupported string
ErrOverlayUnsupported is the error determining whether OverlayFS is supported.
func (ErrOverlayUnsupported) Error ¶ added in v1.14.0
func (e ErrOverlayUnsupported) Error() string
type NetList ¶ added in v0.9.0
type NetList struct {
// contains filtered or unexported fields
}
NetList implements the flag.Value interface to allow specification of --net with and without values Example: --net="all,net1:k1=v1;k2=v2,net2:l1=w1"
func (*NetList) Contained ¶ added in v0.10.0
Check if the container needs to be put in a separate network namespace
func (*NetList) None ¶ added in v0.10.0
Check if 'none' (loopback only) networking has been requested