config

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

README

rudder-platform

Documentation

Index

Constants

View Source
const (
	EmbeddedMode      = "embedded"
	MasterMode        = "master"
	MasterSlaveMode   = "master_and_slave"
	SlaveMode         = "slave"
	OffMode           = "off"
	PooledWHSlaveMode = "embedded_master"
)

Rudder server supported config constants

Variables

This section is empty.

Functions

func GetBool

func GetBool(key string, defaultValue bool) (value bool)

GetBool is a wrapper for viper's GetBool

func GetDuration

func GetDuration(key string, defaultValue time.Duration) (value time.Duration)

GetDuration is wrapper for viper's GetDuration

func GetEnv

func GetEnv(key string, defaultVal string) string

GetEnv returns the environment value stored in key variable

func GetEnvAsBool

func GetEnvAsBool(name string, defaultVal bool) bool

GetEnvAsBool returns the boolean environment value stored in key variable

func GetEnvAsInt

func GetEnvAsInt(key string, defaultVal int) int

GetEnvAsInt returns the int value of environment value stored in the key variable If not set, default value will be return. If set but unparsable, returns 0

func GetFloat64

func GetFloat64(key string, defaultValue float64) (value float64)

GetFloat64 is wrapper for viper's GetFloat64

func GetInt

func GetInt(key string, defaultValue int) (value int)

GetInt is wrapper for viper's GetInt

func GetInt64

func GetInt64(key string, defaultValue int64) (value int64)

GetInt64 is wrapper for viper's GetInt

func GetRequiredEnv

func GetRequiredEnv(key string) string

GetRequiredEnv returns the environment value stored in key variable, no default

func GetRequiredEnvAsInt

func GetRequiredEnvAsInt(key string) int

GetRequiredEnvAsInt returns the environment value stored in key variable as int, no default

func GetString

func GetString(key string, defaultValue string) (value string)

GetString is wrapper for viper's GetString

func GetVarCharMaxForRS

func GetVarCharMaxForRS() bool

func GetWHSchemaVersion

func GetWHSchemaVersion() string

func GetWorkspaceToken

func GetWorkspaceToken() string

GetWorkspaceToken returns the workspace token provided in the environment variables Env variable CONFIG_BACKEND_TOKEN is deprecating soon WORKSPACE_TOKEN is newly introduced. This will override CONFIG_BACKEND_TOKEN

func Initialize

func Initialize()

Initialize used to initialize config package Deprecated - There is no need to directly call Initialize, config is initialized via its package init()

func IsEnvSet

func IsEnvSet(key string) bool

IsEnvSet checks if an environment variable is set

func IsSet

func IsSet(key string) bool

IsSet checks if config is set for a key

func SetBool

func SetBool(key string, value bool)

SetBool override existing config

func SetString

func SetString(key string, value string)

func SetWHSchemaVersion

func SetWHSchemaVersion(version string)

func TransformKey

func TransformKey(s string) string

TransformKey as package method to get the formatted env from a give string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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