in resources/templates/goad-redux/go-lambda/load-gen/main.go [62:93]
func main() {
// Init stuffs
switch os.Getenv("USE_PUT_METRICS") {
case "true", "1":
data_put = true
case "false", "0":
data_put = false
}
switch os.Getenv("USE_LOG_METRICS") {
case "true", "1":
data_log = true
case "false", "0":
data_log = false
}
if data_put {
// Initialize a session that the SDK uses to load
// credentials from the shared credentials file ~/.aws/credentials
// and configuration from the shared configuration file ~/.aws/config.
sess := session.Must(session.NewSessionWithOptions(session.Options{
SharedConfigState: session.SharedConfigEnable,
}))
// Create new cloudwatch client.
svc_cw = cloudwatch.New(sess)
}
// Handler loop
lambda.Start(handler)
// // for local testing
// handler(controlData{ConnectionTargetUrl: "http://34.218.235.51/phpinfo/"})
}