common

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package common defines values shared by different parts of rkt (e.g. stage0 and stage1)

Index

Constants

View Source
const (
	AppsInfoDir = "/appsinfo"

	EnvLockFd                    = "RKT_LOCK_FD"
	EnvSELinuxContext            = "RKT_SELINUX_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"
)
View Source
const (
	RktGroup = "rkt"
)

Variables

This section is empty.

Functions

func AppImageManifestPath added in v0.15.0

func AppImageManifestPath(root string, appName types.ACName) string

AppImageManifestPath returns the path to the app's ImageManifest file

func AppInfoPath added in v0.9.0

func AppInfoPath(root string, appName types.ACName) string

AppInfoPath returns the path to the app's appsinfo directory of a pod.

func AppPath added in v0.8.0

func AppPath(root string, appName types.ACName) string

AppPath returns the path to an app's rootfs.

func AppRootfsPath

func AppRootfsPath(root string, appName types.ACName) string

AppRootfsPath returns the path to an app's rootfs.

func AppTreeStoreIDPath added in v0.9.0

func AppTreeStoreIDPath(root string, appName types.ACName) string

AppTreeStoreIDPath returns the path to the app's treeStoreID file of a pod.

func AppsInfoPath added in v0.9.0

func AppsInfoPath(root string) string

AppsInfoPath returns the path to the appsinfo directory of a pod.

func AppsPath added in v0.8.0

func AppsPath(root string) string

AppsPath returns the path where the apps within a pod live.

func GetRktLockFD added in v0.5.1

func GetRktLockFD() (int, error)

func ImageManifestPath

func ImageManifestPath(root string, appName types.ACName) string

ImageManifestPath returns the path to the app's manifest file of a pod.

func LookupGid added in v0.9.0

func LookupGid(groupName string) (gid int, err error)

LookupGid reads the group file and returns the gid of the group specified by groupName.

func MetadataServicePublicURL added in v0.4.0

func MetadataServicePublicURL(ip net.IP, token string) string

MetadataServicePublicURL returns the public URL used to host the metadata service

func PodManifestPath added in v0.5.1

func PodManifestPath(root string) string

PodManifestPath returns the path in root to the Pod Manifest

func RelAppPath added in v0.8.0

func RelAppPath(appName types.ACName) string

RelAppPath returns the path of an app relative to the stage1 chroot.

func RelAppRootfsPath

func RelAppRootfsPath(appName types.ACName) string

RelAppRootfsPath returns the path of an app's rootfs relative to the stage1 chroot.

func SharedVolumesPath added in v0.9.0

func SharedVolumesPath(root string) string

SharedVolumesPath returns the path to the shared (empty) volumes of a pod.

func SliceToPath added in v0.6.1

func SliceToPath(unit string) (string, error)

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

func Stage1ImagePath(root string) string

Stage1ImagePath returns the path where the stage1 app image (unpacked ACI) is rooted, (i.e. where its contents are extracted during stage0).

func Stage1ManifestPath

func Stage1ManifestPath(root string) string

Stage1ManifestPath returns the path to the stage1's manifest file inside the expanded ACI.

func Stage1RootfsPath

func Stage1RootfsPath(root string) string

Stage1RootfsPath returns the path to the stage1 rootfs

func SupportsOverlay added in v0.5.2

func SupportsOverlay() bool

SupportsOverlay returns whether the system supports overlay filesystem

func SupportsUserNS added in v0.8.0

func SupportsUserNS() bool

SupportsUserNS returns whether the kernel has CONFIG_USER_NS set

Types

type Group added in v0.9.0

type Group struct {
	Name  string
	Pass  string
	Gid   int
	Users []string
}

Group represents an entry in the group file.

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) All added in v0.9.0

func (l *NetList) All() bool

func (*NetList) Contained added in v0.10.0

func (l *NetList) Contained() bool

Check if the container needs to be put in a separate network namespace

func (*NetList) Host added in v0.9.0

func (l *NetList) Host() bool

Check if host networking has been requested

func (*NetList) None added in v0.10.0

func (l *NetList) None() bool

Check if 'none' (loopback only) networking has been requested

func (*NetList) Set added in v0.9.0

func (l *NetList) Set(value string) error

func (*NetList) Specific added in v0.9.0

func (l *NetList) Specific(net string) bool

func (*NetList) SpecificArgs added in v0.9.0

func (l *NetList) SpecificArgs(net string) string

func (*NetList) String added in v0.9.0

func (l *NetList) String() string

func (*NetList) Strings added in v0.9.0

func (l *NetList) Strings() []string

func (*NetList) StringsOnlyNames added in v0.9.0

func (l *NetList) StringsOnlyNames() []string

func (*NetList) Type added in v0.9.0

func (l *NetList) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL