config

package
Version: v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ThermosExecutorDelimiter     = ","
	ThermosExecutorIDPlaceholder = "PLACEHOLDER"
)

Variables

This section is empty.

Functions

func Parse

func Parse(config interface{}, configFiles ...string) error

Parse loads the given configFiles in order, merges them together, and parse into given config interface.

Types

type PelotonSecretsConfig

type PelotonSecretsConfig struct {
	CassandraUsername string `yaml:"peloton_cassandra_username"`
	CassandraPassword string `yaml:"peloton_cassandra_password"`
}

PelotonSecretsConfig will be used to interpret secrets mounted for Peloton service

type ThermosExecutorConfig

type ThermosExecutorConfig struct {
	// The following themros executor related flags should have identical
	// behavior as the one with Aurora Scheduler:
	// http://aurora.apache.org/documentation/latest/reference/scheduler-configuration/
	//
	// path:
	//   Path to the thermos executor entry point.
	// resources:
	//   A comma separated list of additional
	//   resources to copy into the sandbox.Note: if thermos_executor_path
	//   is not the thermos_executor.pex file itself, this must include it.
	// flags:
	//   Extra arguments to be passed to the thermos executor
	// cpu:
	//   The number of CPU cores to allocate for each instance of the executor.
	// ram:
	//   The amount of RAM in MB to allocate for each instance of the executor.
	Path      string  `yaml:"path"`
	Resources string  `yaml:"resources"`
	Flags     string  `yaml:"flags"`
	CPU       float64 `yaml:"cpu"`
	RAM       int64   `yaml:"ram"`
}

ThermosExecutorConfig wraps the config for thermos executor

func (ThermosExecutorConfig) NewThermosCommandInfo

func (c ThermosExecutorConfig) NewThermosCommandInfo() *mesos_v1.CommandInfo

NewThermosCommandInfo creates Mesos CommandInfo for thermos executor similar to Aurora's behavior. Reference: https://github.com/apache/aurora/blob/master/src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java#L120

func (ThermosExecutorConfig) NewThermosExecutorInfo

func (c ThermosExecutorConfig) NewThermosExecutorInfo(executorData []byte) *mesos_v1.ExecutorInfo

NewThermosExecutorInfo creates Mesos ExecutorInfo for thermos executor.

func (ThermosExecutorConfig) Validate

func (c ThermosExecutorConfig) Validate() error

Validate validates ThermosExecutorConfig

type ValidationError

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

ValidationError is the returned when a configuration fails to pass validation

func (ValidationError) ErrForField

func (e ValidationError) ErrForField(name string) error

ErrForField returns the validation error for the given field

func (ValidationError) Error

func (e ValidationError) Error() string

Error returns the error string from a ValidationError

Jump to

Keyboard shortcuts

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