berops / claudie

Cloud-agnostic managed Kubernetes
https://docs.claudie.io/
Apache License 2.0
600 stars 41 forks source link

Chore: Replace channels with Semaphores #1534

Open Despire opened 3 weeks ago

Despire commented 3 weeks ago

Description

Within the codebase we limit the number of spawned processed for each service. To achieve this buffered channels are used, e.g. https://github.com/berops/claudie/blob/74579c0cabe5a6f91d7118fd9b68546a44cc9e45/services/terraformer/server/domain/usecases/build_infrastructure.go#L19

This is an anti-pattern in Go and these should be replaced with an actual semaphore https://pkg.go.dev/golang.org/x/sync/semaphore

Exit criteria