INNER CODE UNIT · Go

handleRequest

redpanda-data/connect · benchmarking/aws/cleanup-lambda/main.go:212

func handleRequest(ctx context.Context, _ struct{}) (SweepReport, error) {
	ttl, err := parseTTL(os.Getenv("BENCH_ORPHAN_TTL_HOURS"))
	if err != nil {
		return SweepReport{}, err
	}
	topicARN := os.Getenv("BENCH_ORPHAN_SNS_TOPIC_ARN")
	if topicARN == "" {
		return SweepReport{}, errors.New("BENCH_ORPHAN_SNS_TOPIC_ARN is required")
	}
	api, err := newAWSCleanup(ctx)
	if err != nil {
		return SweepReport{}, err
	}
	slog.Info("starting sweep", "ttl", ttl)
	return Sweep(ctx, api, time.Now(), ttl, topicARN)
}

func main() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…