Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ClusterInfo package #793

Open
sysadmind opened this issue Oct 15, 2023 · 0 comments
Open

Refactor ClusterInfo package #793

sysadmind opened this issue Oct 15, 2023 · 0 comments

Comments

@sysadmind
Copy link
Contributor

The clusterinfo package pkg/clusterinfo is designed to relay updates to collectors periodically. The way it is written seems complicated. Collectors are registered with the clusterinfo package and are sent information over a channel periodically. The cluserinfo collector has already been refactored to use the collector.Collector interface in collector/cluster_info.go.

One problem with the current implementation is that the collectors need to have a channel to receive updates, however neither the collector nor the clusterinfo package handle closing those channels. This could potentially leak resources.

We should design a more friendly API for collectors that need this information. Additionally, we should decide if this functionality needs to exist at all.

References:
PR adding collector that needs to register with clusterinfo #639
Original Implementation #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant