config

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

View Source
const (
	CONFIG_File                          = "config"
	FOLDER_NAME                          = "foldername"
	HEALTH_CHECK                         = "healthcheck"
	POD_MONITOR_INTERVAL                 = "launchtask.podmonitorinterval"
	TIMEOUT                              = "launchtask.timeout"
	INFRA_CONTAINER                      = "infracontainer"
	PULL_RETRY                           = "launchtask.pullretry"
	MAX_RETRY                            = "launchtask.maxretry"
	RETRY_INTERVAL                       = "launchtask.retryinterval"
	NETWORKS                             = "networks"
	PRE_EXIST                            = "pre_existing"
	NETWORK_NAME                         = "name"
	NETWORK_DRIVER                       = "driver"
	CLEANPOD                             = "cleanpod"
	CLEAN_CONTAINER_VOLUME_ON_MESOS_KILL = "cleanpod.cleanvolumeandcontaineronmesoskill"
	CLEAN_IMAGE_ON_MESOS_KILL            = "cleanpod.cleanimageonmesoskill"
	CLEAN_FAIL_TASK                      = "cleanpod.cleanfailtask"
	DOCKER_COMPOSE_VERBOSE               = "dockercomposeverbose"
	SKIP_PULL_IMAGES                     = "launchtask.skippull"
	COMPOSE_TRACE                        = "launchtask.composetrace"
	DEBUG_MODE                           = "launchtask.debug"
	COMPOSE_HTTP_TIMEOUT                 = "launchtask.composehttptimeout"
	HTTP_TIMEOUT                         = "launchtask.httptimeout"
	COMPOSE_STOP_TIMEOUT                 = "cleanpod.timeout"
	CONFIG_OVERRIDE_PREFIX               = "config."
)

Define default values

Variables

This section is empty.

Functions

func ConfigInit

func ConfigInit(pluginConfig string)

Plugin extensions could merge configuration using ConfigInit with configuration file

func CreateFileAppendMode

func CreateFileAppendMode(filename string) *os.File

func EnableComposeTrace

func EnableComposeTrace() bool

func EnableDebugMode

func EnableDebugMode() bool

func EnableVerbose

func EnableVerbose() bool

func GetAppFolder

func GetAppFolder() string

func GetComposeHttpTimeout

func GetComposeHttpTimeout() int

func GetConfig

func GetConfig() *viper.Viper

func GetConfigSection

func GetConfigSection(section string) map[string]string

func GetHttpTimeout

func GetHttpTimeout() time.Duration

func GetLaunchTimeout

func GetLaunchTimeout() time.Duration

GetLaunchTimeout returns maximum time to wait until a pod becomes healthy. Support value type as duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"

func GetMaxRetry

func GetMaxRetry() int

func GetNetwork

func GetNetwork() (types.Network, bool)

func GetPollInterval

func GetPollInterval() time.Duration

func GetPullRetryCount

func GetPullRetryCount() int

func GetRetryInterval

func GetRetryInterval() time.Duration

func GetStopTimeout

func GetStopTimeout() int

GetStopTimeout returns the grace period time for a pod to die Returns time in seconds as an integer

func IsService

func IsService() bool

func OverrideConfig

func OverrideConfig(taskInfo *mesos.TaskInfo)

OverrideConfig gets labels with override prefix "config." and override configs with value of label Checking labels contain key word "config." instead of prefix since different framework will add different prefix for labels

func SetConfig

func SetConfig(key string, value interface{})

func SkipPullImages

func SkipPullImages() bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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