INNER CODE UNIT · Go

init

brexhq/substation · cmd/aws/lambda/autoscale/main.go:49

func init() {
	ctx := context.Background()

	awsCfg, err := iconfig.NewAWS(ctx, iconfig.AWS{})
	if err != nil {
		panic(fmt.Errorf("init: %v", err))
	}

	cloudwatchC = cloudwatch.NewFromConfig(awsCfg)
	kinesisC = kinesis.NewFromConfig(awsCfg)

	if v, found := os.LookupEnv("AUTOSCALE_KINESIS_DOWNSCALE_DATAPOINTS"); found {
		dps, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}

		if dps <= math.MaxInt32 && dps >= 1 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…