config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: Apache-2.0 Imports: 6 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// FrameworkID of the scheduler needed as part of the SUBSCRIBE call
	FrameworkID string
	// ExecutorID of the executor needed as part of the SUBSCRIBE call
	ExecutorID string
	// Directory is the path to the working directory for the executor on the host filesystem (deprecated).
	Directory string
	// Sandbox is the path to the mapped sandbox inside of the container (determined by the agent flag
	// `sandbox_directory`) for either mesos container with image or docker container. For the case of
	// command task without image specified, it is the path to the sandbox on the host filesystem, which is
	// identical to `MESOS_DIRECTORY`. `MESOS_DIRECTORY` is always the sandbox on the host filesystem.
	Sandbox string
	// AgentEndpoint is the endpoint i.e. ip:port to be used by the executor to connect
	// to the agent
	AgentEndpoint string
	// ExecutorShutdownGracePeriod is the amount of time the agent would wait for an
	// executor to shut down (e.g., 60 secs, 3mins etc.) after sending a SHUTDOWN event
	ExecutorShutdownGracePeriod time.Duration

	// Checkpoint is set i.e. when framework checkpointing is enabled; if set then
	// RecoveryTimeout and SubscriptionBackoffMax are also set.
	Checkpoint bool
	// The total duration that the executor should spend retrying before shutting itself
	// down when it is disconnected from the agent (e.g., 15mins, 5secs etc.)
	RecoveryTimeout time.Duration
	// The maximum backoff duration to be used by the executor between two retries when
	// disconnected (e.g., 250ms, 1mins etc.)
	SubscriptionBackoffMax time.Duration
}

func FromEnv

func FromEnv() (Config, error)

FromEnv returns a configuration generated from MESOS_xyz environment variables.

type EnvError

type EnvError struct {
	Reasons []error
	Message string
}

func (*EnvError) Error

func (ee *EnvError) Error() string

Jump to

Keyboard shortcuts

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