config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBoshRoot = "/var/vcap"

Variables

This section is empty.

Functions

func BundlesRoot

func BundlesRoot(boshRoot string) string

func RuncPath

func RuncPath(boshRoot string) string

func RuncRoot

func RuncRoot(boshRoot string) string

Types

type BPMConfig

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

func NewBPMConfig

func NewBPMConfig(boshRoot, 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() string

func (*BPMConfig) DataPackageDir

func (c *BPMConfig) DataPackageDir() string

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() string

func (*BPMConfig) JobName

func (c *BPMConfig) JobName() string

func (*BPMConfig) LockFile

func (c *BPMConfig) LockFile() string

func (*BPMConfig) LogDir

func (c *BPMConfig) LogDir() string

func (*BPMConfig) PackageDir

func (c *BPMConfig) PackageDir() string

func (*BPMConfig) ParseJobConfig added in v0.7.0

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

func (*BPMConfig) PidDir

func (c *BPMConfig) PidDir() string

func (*BPMConfig) PidFile

func (c *BPMConfig) PidFile() string

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() string

func (*BPMConfig) Stderr

func (c *BPMConfig) Stderr() string

func (*BPMConfig) Stdout

func (c *BPMConfig) Stdout() string

func (*BPMConfig) StoreDir

func (c *BPMConfig) StoreDir() string

func (*BPMConfig) TempDir

func (c *BPMConfig) TempDir() string

type Bosh added in v0.3.0

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

func NewBosh added in v0.3.0

func NewBosh(root string) *Bosh

func (*Bosh) JobNames added in v0.5.0

func (b *Bosh) JobNames() []string

func (*Bosh) Root added in v0.3.0

func (b *Bosh) Root() string

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(boshRoot string, 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,
	boshRoot string,
	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,
	boshRoot string,
	defaultVolumes []string,
) error

func (*ProcessConfig) Validate

func (c *ProcessConfig) Validate(boshRoot string, 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"`
}

Jump to

Keyboard shortcuts

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