util

package
v1.300050.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemDrive = "SystemDrive"
	ProgramData = "ProgramData"
)

environment var definition

View Source
const (
	DEFAULT_PROFILE = "AmazonCloudWatchAgent"
)

Variables

View Source
var DefaultEC2Region = defaultEC2Region
View Source
var DefaultECSRegion = defaultECSRegion
View Source
var DetectCredentialsPath = detectCredentialsPath
View Source
var DetectRegion = detectRegion
View Source
var IsEKS = isEKS

Functions

func CheckAndSetHomeDir

func CheckAndSetHomeDir()

func DetectAgentMode

func DetectAgentMode(configuredMode string) string

func DetectKubernetesMode added in v1.300034.0

func DetectKubernetesMode(configuredMode string) string

func GetConfigPath added in v1.300050.0

func GetConfigPath(configFileName string, sectionKey string, defaultPath string, input interface{}) (interface{}, error)

func GetCredentials

func GetCredentials(mode string, credsConfig map[string]string) (result map[string]string)

func GetDefaultJsonConfigMap

func GetDefaultJsonConfigMap(osType, mode string) (map[string]interface{}, error)

func GetHttpProxy

func GetHttpProxy(proxyConfig map[string]string) (result map[string]string)

func GetHttpsProxy

func GetHttpsProxy(proxyConfig map[string]string) (result map[string]string)

func GetJsonMapFromFile

func GetJsonMapFromFile(filename string) (map[string]interface{}, error)

get the json map from a file

func GetJsonMapFromJsonBytes

func GetJsonMapFromJsonBytes(jsonArray []byte) (map[string]interface{}, error)

get the json map from the json byte array

func GetNoProxy

func GetNoProxy(proxyConfig map[string]string) (result map[string]string)

func GetSSL

func GetSSL(sslConfig map[string]string) (result map[string]string)

func GetWindowsProgramDataPath

func GetWindowsProgramDataPath() string

func GetWindowsSystemDrivePath

func GetWindowsSystemDrivePath() string

func LoadImdsRetries added in v1.300028.0

func LoadImdsRetries(imdsConfig *commonconfig.IMDS)

func SDKRegionWithCredsMap

func SDKRegionWithCredsMap(mode string, credsConfig map[string]string) (region string)

func SetProxyEnv

func SetProxyEnv(proxyConfig map[string]string)

func SetSSLEnv

func SetSSLEnv(sslConfig map[string]string)

func SetWithCustomizedKeyIfFound

func SetWithCustomizedKeyIfFound(input interface{}, targetKeyMap map[string]string, result map[string]interface{})

We are doing one level search here

func SetWithSameKeyIfFound

func SetWithSameKeyIfFound(input interface{}, target_key_list []string, result map[string]interface{})

We are doing one level search here

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