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

IClusterChangeListener singleton ? #613

Closed
3GDXC opened this issue Dec 11, 2020 · 5 comments
Closed

IClusterChangeListener singleton ? #613

3GDXC opened this issue Dec 11, 2020 · 5 comments
Labels
needs-author-action An issue or pull request that requires more info or actions from the author. Type: Feedback This issue is general feedback and doesn't represent actionable work.

Comments

@3GDXC
Copy link

3GDXC commented Dec 11, 2020

I would like to register additional IClusterChangeListerners to the DI system; so I may hook into these events and update the Microsoft.Extensions.Diagnostics.HealthChecks and subsequently the health UI reports will display cluster status.

@3GDXC 3GDXC added the Type: Feedback This issue is general feedback and doesn't represent actionable work. label Dec 11, 2020
@3GDXC
Copy link
Author

3GDXC commented Dec 11, 2020

Ideally the internal sealed class ClusterManager should be made non-sealed public class so a developer could derive from it and implement addition logic/rules etc.

i.e. if a cluster is added/removed we'd like a message set to a remote alerting/monitoring systems

@Tratcher
Copy link
Member

Multiple listeners are supported:

public ClusterManager(IDestinationManagerFactory destinationManagerFactory, IEnumerable<IClusterChangeListener> changeListeners)

Singleton has to do with object lifetime (it lives for the lifetime of the app), not how many there are.

See #125 for related discussions about proxy health.

Ideally the internal sealed class ClusterManager should be made non-sealed public class so a developer could derive from it and implement addition logic/rules etc.

i.e. if a cluster is added/removed we'd like a message set to a remote alerting/monitoring systems

You should be able to do that with the IClusterChangeListeners.

@3GDXC
Copy link
Author

3GDXC commented Dec 11, 2020

@Tratcher odd; as when I've tried to add a IClusterChangeListeners to the DI system; it never gets created? or called, I will review add get back or create a repo to reproduce.

@karelz
Copy link
Member

karelz commented Dec 17, 2020

Triage: We are pretty sure it works (we're using it for HealthChecks). Can you please provide (simplified) repro for us?

@karelz karelz added the needs-author-action An issue or pull request that requires more info or actions from the author. label Dec 17, 2020
@karelz
Copy link
Member

karelz commented Feb 11, 2021

Triage: No repro, closing. Feel free to reopen if there is more evidence. Thanks!

@karelz karelz closed this as completed Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-author-action An issue or pull request that requires more info or actions from the author. Type: Feedback This issue is general feedback and doesn't represent actionable work.
Projects
None yet
Development

No branches or pull requests

3 participants