Background:
We have a converger mechanism in mgmt. The rough idea is that since everything is "live" (and a new event could come at any moment) we're never done in the way a puppet or ansible run finishes, but rather we can only know how many seconds we've "converged" for.
Converger is a golang module which keeps track of the reporting from all the different resources and other systems. They report in to say "I'm converged" or "I'm still working on something... cpu is churning, please wait..."
This information can be used for two main situations:
- Let the user shutdown if for example we've been converged for 15 seconds (--converged-timeout)
- Let the user know that nothing else is busy "processing" in the background. We'd like to be able to write in our logs that "now converged for 60 seconds" or something like that followed by "unconverged and processing..." (actual message text should vary)
We'd like this code to be safe, efficient, deadlock free, and fast =D
The old code is in converger/ and it probably needs a rewrite. In particular the second situation ("let the user know...") isn't implemented yet.
I think the converger Register API that is used everywhere is reasonable, but if there's a better approach, that is fine too.
Testing may be hard, but suggestions here are welcome!
Background:
We have a converger mechanism in mgmt. The rough idea is that since everything is "live" (and a new event could come at any moment) we're never done in the way a puppet or ansible run finishes, but rather we can only know how many seconds we've "converged" for.
Converger is a golang module which keeps track of the reporting from all the different resources and other systems. They report in to say "I'm converged" or "I'm still working on something... cpu is churning, please wait..."
This information can be used for two main situations:
We'd like this code to be safe, efficient, deadlock free, and fast =D
The old code is in converger/ and it probably needs a rewrite. In particular the second situation ("let the user know...") isn't implemented yet.
I think the converger Register API that is used everywhere is reasonable, but if there's a better approach, that is fine too.
Testing may be hard, but suggestions here are welcome!