config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2018 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 Decode

func Decode(containerID string) (string, error)

func Encode

func Encode(containerID string) string

runc spec only allows `^[\w+-\.]+$` https://github.com/opencontainers/runc/blob/master/libcontainer/factory_linux.go

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) ConfigDir

func (c *BPMConfig) ConfigDir() string

func (*BPMConfig) ContainerID

func (c *BPMConfig) ContainerID(encoded bool) string

func (*BPMConfig) DataDir

func (c *BPMConfig) DataDir() string

func (*BPMConfig) DataPackageDir

func (c *BPMConfig) DataPackageDir() 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) 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) 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) JobPaths added in v0.3.0

func (b *Bosh) JobPaths() []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() 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"`
}

func (*ProcessConfig) Validate

func (c *ProcessConfig) Validate() error

type Volume added in v0.2.0

type Volume struct {
	Path     string `yaml:"path"`
	Writable bool   `yaml:"writable"`
}

Jump to

Keyboard shortcuts

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