config

package
v0.0.0-...-bafb2d1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigBool

func GetConfigBool(envKey string, defaultConf bool, logger zap.Logger) bool

GetConfigBool ...

func GetConfigInt

func GetConfigInt(envKey string, defaulfConf int, logger zap.Logger) int

GetConfigInt ...

func GetConfigString

func GetConfigString(envKey, defaultConf string) string

GetConfigString ...

func GetConfigStringList

func GetConfigStringList(envKey string, defaultConf string, logger zap.Logger) []string

GetConfigStringList ...

func GetGoPath

func GetGoPath() string

GetGoPath ...

func LoadClusterInfoMap

func LoadClusterInfoMap(kubeclient kubernetes.Interface, logger *zap.Logger) error

LoadClusterInfoMap ... Read cluster metadata from 'cluster-info' map and load into ENV

func ParseConfig

func ParseConfig(filePath string, conf interface{}, logger zap.Logger)

ParseConfig ...

func SetUpEvn

func SetUpEvn(kubeclient kubernetes.Interface, logger *zap.Logger) error

SetUpEvn ... Export the configmap (eg. cluster-info) to environment variables

Types

type ClusterInfo

type ClusterInfo struct {
	ClusterID   string `json:"cluster_id"`
	ClusterName string `json:"cluster_name,omitempty"`
	DataCenter  string `json:"datacenter,omitempty"`
	CustomerID  string `json:"customer_id,omitempty"`
}

ClusterInfo ...

Jump to

Keyboard shortcuts

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