config

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundlesRoot

func BundlesRoot(env *bosh.Env) string

func LocksPath added in v1.1.0

func LocksPath(env *bosh.Env) string

func RuncPath

func RuncPath(env *bosh.Env) string

func RuncRoot

func RuncRoot(env *bosh.Env) string

Types

type BPMConfig

type BPMConfig struct {
	// contains filtered or unexported fields
}

func NewBPMConfig

func NewBPMConfig(boshEnv *bosh.Env, jobName, procName string) *BPMConfig

func (*BPMConfig) BPMLog

func (c *BPMConfig) BPMLog() string

func (*BPMConfig) BundlePath

func (c *BPMConfig) BundlePath() string

func (*BPMConfig) ContainerID

func (c *BPMConfig) ContainerID() string

func (*BPMConfig) DataDir

func (c *BPMConfig) DataDir() bosh.Path

func (*BPMConfig) DataPackageDir

func (c *BPMConfig) DataPackageDir() bosh.Path

func (*BPMConfig) DefaultVolumes added in v0.10.0

func (c *BPMConfig) DefaultVolumes() []string

func (*BPMConfig) JobConfig

func (c *BPMConfig) JobConfig() string

func (*BPMConfig) JobDir

func (c *BPMConfig) JobDir() bosh.Path

func (*BPMConfig) JobName

func (c *BPMConfig) JobName() string

func (*BPMConfig) LockFile

func (c *BPMConfig) LockFile() bosh.Path

func (*BPMConfig) LogDir

func (c *BPMConfig) LogDir() bosh.Path

func (*BPMConfig) PackageDir

func (c *BPMConfig) PackageDir() bosh.Path

func (*BPMConfig) ParseJobConfig added in v0.7.0

func (c *BPMConfig) ParseJobConfig() (*JobConfig, error)

func (*BPMConfig) PidDir

func (c *BPMConfig) PidDir() bosh.Path

func (*BPMConfig) PidFile

func (c *BPMConfig) PidFile() bosh.Path

func (*BPMConfig) ProcName

func (c *BPMConfig) ProcName() string

func (*BPMConfig) RootFSPath

func (c *BPMConfig) RootFSPath() string

func (*BPMConfig) SocketDir added in v0.13.0

func (c *BPMConfig) SocketDir() bosh.Path

func (*BPMConfig) Stderr

func (c *BPMConfig) Stderr() bosh.Path

func (*BPMConfig) Stdout

func (c *BPMConfig) Stdout() bosh.Path

func (*BPMConfig) StoreDir

func (c *BPMConfig) StoreDir() bosh.Path

func (*BPMConfig) TempDir

func (c *BPMConfig) TempDir() bosh.Path

func (*BPMConfig) TiniPath added in v1.1.0

func (c *BPMConfig) TiniPath() bosh.Path

type Hooks

type Hooks struct {
	PreStart string `yaml:"pre_start"`
}

type JobConfig

type JobConfig struct {
	Processes []*ProcessConfig `yaml:"processes"`
}

func ParseJobConfig

func ParseJobConfig(configPath string) (*JobConfig, error)

func (*JobConfig) Validate

func (c *JobConfig) Validate(boshEnv *bosh.Env, defaultVolumes []string) error

type Limits

type Limits struct {
	Memory    *string `yaml:"memory"`
	OpenFiles *uint64 `yaml:"open_files"`
	Processes *int64  `yaml:"processes"`
}

type ProcessConfig

type ProcessConfig struct {
	Name              string            `yaml:"name"`
	Executable        string            `yaml:"executable"`
	Args              []string          `yaml:"args"`
	Env               map[string]string `yaml:"env"`
	AdditionalVolumes []Volume          `yaml:"additional_volumes"`
	Capabilities      []string          `yaml:"capabilities"`
	EphemeralDisk     bool              `yaml:"ephemeral_disk"`
	Hooks             *Hooks            `yaml:"hooks,omitempty"`
	Limits            *Limits           `yaml:"limits"`
	PersistentDisk    bool              `yaml:"persistent_disk"`
	WorkDir           string            `yaml:"workdir"`
	Unsafe            *Unsafe           `yaml:"unsafe"`
}

func (*ProcessConfig) AddEnvVars added in v0.12.0

func (c *ProcessConfig) AddEnvVars(
	env []string,
	boshEnv *bosh.Env,
	defaultVolumes []string,
) error

AddEnvVars allows additional environment variables to be added to a process configuration after parsing the configuration file. The environment variables take the form of "KEY=VALUE". If a key is specified multiple times then the last valeu wins.

func (*ProcessConfig) AddVolumes added in v0.10.0

func (c *ProcessConfig) AddVolumes(
	volumes []string,
	boshEnv *bosh.Env,
	defaultVolumes []string,
) error

func (*ProcessConfig) Validate

func (c *ProcessConfig) Validate(boshEnv *bosh.Env, defaultVolumes []string) error

type Unsafe added in v0.6.0

type Unsafe struct {
	Privileged          bool     `yaml:"privileged"`
	UnrestrictedVolumes []Volume `yaml:"unrestricted_volumes"`
}

type Volume added in v0.2.0

type Volume struct {
	Path            string `yaml:"path"`
	Writable        bool   `yaml:"writable"`
	AllowExecutions bool   `yaml:"allow_executions"`
	MountOnly       bool   `yaml:"mount_only"`
	Shared          bool   `yaml:"shared"`
}

Jump to

Keyboard shortcuts

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