layers

package
v1.25.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

type Flag uint8

Flag is a type used to represent layer metadata flags.

const (
	// Build indicates that a layer should be used for builds
	Build Flag = iota

	// Cache indicates that a layer should be cached
	Cache

	// Launch indicates that a layer should be used for launch
	Launch
)

type Layer

type Layer struct {
	// Root is the path to the root directory for the layer.
	Root string

	// Metadata is the location of the layer's metadata file.
	Metadata string
	// contains filtered or unexported fields
}

Layer represents a layer for an application.

func (Layer) AppendBuildEnv

func (l Layer) AppendBuildEnv(name string, format string, args ...interface{}) error

AppendBuildEnv appends the value of this environment variable to any previous declarations of the value without any delimitation. If delimitation is important during concatenation, callers are required to add it.

func (Layer) AppendLaunchEnv

func (l Layer) AppendLaunchEnv(name string, format string, args ...interface{}) error

AppendLaunchEnv appends the value of this environment variable to any previous declarations of the value without any delimitation. If delimitation is important during concatenation, callers are required to add it.

func (Layer) AppendPathBuildEnv deprecated

func (l Layer) AppendPathBuildEnv(name string, format string, args ...interface{}) error

AppendPathBuildEnv appends the value of this environment variable to any previous declarations of the value using the OS path delimiter.

Deprecated: Use PrependPathBuildEnv

func (Layer) AppendPathLaunchEnv deprecated

func (l Layer) AppendPathLaunchEnv(name string, format string, args ...interface{}) error

AppendPathLaunchEnv appends the value of this environment variable to any previous declarations of the value using the OS path delimiter.

Deprecated: Use PrependPathLaunchEnv

func (Layer) AppendPathSharedEnv deprecated

func (l Layer) AppendPathSharedEnv(name string, format string, args ...interface{}) error

AppendPathSharedEnv appends the value of this environment variable to any previous declarations of the value using the OS path delimiter.

Deprecated: Use PrependPathSharedEnv

func (Layer) AppendSharedEnv

func (l Layer) AppendSharedEnv(name string, format string, args ...interface{}) error

AppendSharedEnv appends the value of this environment variable to any previous declarations of the value without any delimitation. If delimitation is important during concatenation, callers are required to add it.

func (Layer) DefaultBuildEnv

func (l Layer) DefaultBuildEnv(name string, format string, args ...interface{}) error

DefaultBuildEnv sets a default for an environment variable with this value.

func (Layer) DefaultLaunchEnv

func (l Layer) DefaultLaunchEnv(name string, format string, args ...interface{}) error

DefaultLaunchEnv sets a default for an environment variable with this value.

func (Layer) DefaultSharedEnv

func (l Layer) DefaultSharedEnv(name string, format string, args ...interface{}) error

DefaultSharedEnv sets a default for an environment variable with this value.

func (Layer) DelimiterBuildEnv

func (l Layer) DelimiterBuildEnv(name string, delimiter string) error

DelimiterBuildEnv sets a delimiter for an environment variable with this value.

func (Layer) DelimiterLaunchEnv

func (l Layer) DelimiterLaunchEnv(name string, delimiter string) error

DelimiterLaunchEnv sets a delimiter for an environment variable with this value.

func (Layer) DelimiterSharedEnv

func (l Layer) DelimiterSharedEnv(name string, delimiter string) error

DelimiterSharedEnv sets a delimiter for an environment variable with this value.

func (Layer) OverrideBuildEnv

func (l Layer) OverrideBuildEnv(name string, format string, args ...interface{}) error

OverrideBuildEnv overrides any existing value for an environment variable with this value.

func (Layer) OverrideLaunchEnv

func (l Layer) OverrideLaunchEnv(name string, format string, args ...interface{}) error

OverrideLaunchEnv overrides any existing value for an environment variable with this value.

func (Layer) OverrideSharedEnv

func (l Layer) OverrideSharedEnv(name string, format string, args ...interface{}) error

OverrideSharedEnv overrides any existing value for an environment variable with this value.

func (Layer) PrependBuildEnv

func (l Layer) PrependBuildEnv(name string, format string, args ...interface{}) error

PrependBuildEnv prepends the value of this environment variable to any previous declarations of the value without any delimitation. If delimitation is important during concatenation, callers are required to add it.

func (Layer) PrependLaunchEnv

func (l Layer) PrependLaunchEnv(name string, format string, args ...interface{}) error

PrependLaunchEnv prepends the value of this environment variable to any previous declarations of the value without any delimitation. If delimitation is important during concatenation, callers are required to add it.

func (Layer) PrependPathBuildEnv

func (l Layer) PrependPathBuildEnv(name string, format string, args ...interface{}) error

PrependPathBuildEnv prepends the value of this environment variable to any previous declarations of the value using the OS path delimiter.

func (Layer) PrependPathLaunchEnv

func (l Layer) PrependPathLaunchEnv(name string, format string, args ...interface{}) error

PrependPathLaunchEnv prepends the value of this environment variable to any previous declarations of the value using the OS path delimiter.

func (Layer) PrependPathSharedEnv

func (l Layer) PrependPathSharedEnv(name string, format string, args ...interface{}) error

PrependPathSharedEnv prepends the value of this environment variable to any previous declarations of the value using the OS path delimiter.

func (Layer) PrependSharedEnv

func (l Layer) PrependSharedEnv(name string, format string, args ...interface{}) error

PrependSharedEnv prepends the value of this environment variable to any previous declarations of the value without any delimitation. If delimitation is important during concatenation, callers are required to add it.

func (Layer) ReadMetadata

func (l Layer) ReadMetadata(metadata interface{}) error

ReadMetadata reads arbitrary layer metadata from the filesystem.

func (Layer) RemoveMetadata

func (l Layer) RemoveMetadata() error

RemoveMetadata remove layer metadata from the filesystem.

func (Layer) WriteMetadata

func (l Layer) WriteMetadata(metadata interface{}, flags ...Flag) error

WriteMetadata writes arbitrary layer metadata to the filesystem.

func (Layer) WriteProfile

func (l Layer) WriteProfile(file string, format string, args ...interface{}) error

WriteProfile writes a file to profile.d with this value.

type Layers

type Layers struct {
	// Root is the path to the root directory for the layers.
	Root string
	// contains filtered or unexported fields
}

Layers represents the layers for an application.

func NewLayers

func NewLayers(root string, logger logger.Logger) Layers

NewLayers creates a new Logger instance.

func (Layers) Layer

func (l Layers) Layer(name string) Layer

Layer creates a Layer with a specified name.

func (Layers) WriteApplicationMetadata

func (l Layers) WriteApplicationMetadata(metadata Metadata) error

WriteApplicationMetadata writes application metadata to the filesystem.

func (Layers) WritePersistentMetadata

func (l Layers) WritePersistentMetadata(metadata interface{}) error

WritePersistentMetadata writes persistent metadata to the filesystem.

type Metadata

type Metadata struct {
	// Processes is a collection of processes.
	Processes Processes `toml:"processes"`

	// Slices is a collection of slices.
	Slices Slices `toml:"slices"`
}

Metadata represents metadata about the Launch.

type Process

type Process struct {
	// Type is the type of the process.
	Type string `toml:"type"`

	// Command is the command of the process.
	Command string `toml:"command"`

	// Command is exec'd directly by the os (no profile.d scripts run)
	Direct bool `toml:"direct"`
}

Process represents metadata about a type of command that can be run.

type Processes

type Processes []Process

Processes is a collection of Process instances.

type Slice

type Slice struct {
	// Paths are the contents of the slice.
	Paths []string `toml:"paths"`
}

Slice represents metadata about a slice.

type Slices

type Slices []Slice

Slices is a collection of Slice instances.

Jump to

Keyboard shortcuts

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