Abdulsametileri/simple-service-discovery

Refactor ServiceRegistry struct with sync/atomic.Value

Abdulsametileri opened this issue · 0 comments

According to feedback from a special reddit user, we change the sync.RWMutex implementation with sync/Atomic.Value, doing so, we can proxy new connections without any blocking during the service registry change.

https://pkg.go.dev/sync/atomic#example-Value-Config