I'm sharing `github.com/joeycumines/go-smartpoll`, a package I've been working on that offers dynamic, reactive scheduling for (among other things) polling of multiple data points, and aggregating the results. It's designed to make it easy to implement a control loop, which involves scheduling "tasks", which run independently, in a singleflight-like manner.
I've consolidated the implementation from a pattern I've been using to implement streaming API methods to wrangle non-atomic, potentially slow/cached external APIs, into a consistent stream of updates, which includes changes made that haven't been reflected in the actual data source, yet. There are many ways to use it though - there's a litmus test in the readme.
I've made an effort to write useful documentation, but it has only gone through one pass.
Tell me what you think, especially re: documentation :)