apps

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 10 modules, 20 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSeccompMode     = errors.New("invalid seccomp mode command-line override")
	ErrInvalidSeccompOverride = errors.New("invalid seccomp command-line override")
)

Functions

This section is empty.

Types

type App

type App struct {
	Name              string                            // the name of the app. If not set, the image's name will be used.
	Image             string                            // the image reference as supplied by the user on the cli
	Args              []string                          // any arguments the user supplied for this app
	Asc               string                            // signature file override for image verification (if fetching occurs)
	Exec              string                            // exec override for image
	WorkingDir        string                            // working directory override for image
	ReadOnlyRootFS    bool                              // read-only rootfs override.
	Mounts            []schema.Mount                    // mounts for this app (superseding any mounts in rktApps.mounts of same MountPoint)
	MemoryLimit       *types.ResourceMemory             // memory isolator override
	CPULimit          *types.ResourceCPU                // cpu isolator override
	CPUShares         *types.LinuxCPUShares             // cpu-shares isolator override
	User, Group       string                            // user, group overrides
	SupplementaryGIDs []int                             // supplementary gids override
	CapsRetain        *types.LinuxCapabilitiesRetainSet // os/linux/capabilities-retain-set overrides
	CapsRemove        *types.LinuxCapabilitiesRevokeSet // os/linux/capabilities-remove-set overrides
	SeccompFilter     string                            // seccomp CLI overrides
	OOMScoreAdj       *types.LinuxOOMScoreAdj           // oom-score-adj isolator override
	Annotations       map[string]string                 // the annotations of the app
	UserAnnotations   map[string]string                 // the user annotations of the app.
	UserLabels        map[string]string                 // the user labels of the app.
	Environments      map[string]string                 // the environments of the app.
	Stdin             AppIO                             // mode for stdin
	Stdout            AppIO                             // mode for stdout
	Stderr            AppIO                             // mode for stderr

	// TODO(jonboulle): These images are partially-populated hashes, this should be clarified.
	ImageID types.Hash // resolved image identifier
}

func (*App) SeccompOverride added in v1.12.0

func (a *App) SeccompOverride() (mode string, errno string, set []string, e error)

SeccompFilter returns type, filter set and optional errno for a seccomp filter override specified via CLI

type AppIO added in v1.24.0

type AppIO string

AppIO describes the type of an application stream at runtime (stdin/stdout/stderr).

const (
	AppIOInteractive AppIO = "interactive" // interactive I/O (parent terminal)
	AppIOLog         AppIO = "log"         // log-only I/O
	AppIONull        AppIO = "null"        // null I/O
	AppIOStream      AppIO = "stream"      // attachable I/O
	AppIOTTY         AppIO = "tty"         // I/O over TTY
)

func (AppIO) String added in v1.24.0

func (a AppIO) String() string

type Apps

type Apps struct {
	Mounts  []schema.Mount // global mounts applied to all apps
	Volumes []types.Volume // volumes available to all apps
	// contains filtered or unexported fields
}

func (*Apps) Count

func (al *Apps) Count() int

Count returns the number of apps in al

func (*Apps) Create

func (al *Apps) Create(img string)

Create creates a new app in al and returns a pointer to it

func (*Apps) GetArgs

func (al *Apps) GetArgs() [][]string

GetArgs returns a list of lists of arguments in al, one list of args per app. The order reflects the app order in al.

func (*Apps) GetImages

func (al *Apps) GetImages() []string

GetImages returns a list of the images in al, one per app. The order reflects the app order in al.

func (*Apps) Last

func (al *Apps) Last() *App

Last returns a pointer to the top app in al

func (*Apps) Reset

func (al *Apps) Reset()

Reset creates a new slice for al.apps, needed by tests

func (*Apps) Validate added in v0.10.0

func (al *Apps) Validate() error

Validate validates al for things like referential integrity of mounts<->volumes.

func (*Apps) Walk

func (al *Apps) Walk(f func(*App) error) error

Walk iterates on al.apps calling f for each app walking stops if f returns an error, the error is simply returned

Jump to

Keyboard shortcuts

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