This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auto refresh of Clusters API (#591)
Refactored code to load the clusters and keep them in cache: done explicitly at `cluster.Service` initialization so the cache is always pre-filled, then use a `sync.RWMutex` to let the readers access the data concurrently, but block access when the writer (running in a separate go routine) needs to change the values Also, use/return `[]cluster.Cluster` instead of `[]*cluster.Cluster` when getting all clusters, and return `cluster.Cluster` when resolving Fixes #515 Signed-off-by: Xavier Coulon <[email protected]>
- Loading branch information
1 parent
b83a946
commit 5714dfd
Showing
18 changed files
with
409 additions
and
95 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.