I’m implementing a streaming go backend-plugin based on the mqtt example.
For now its pretty straight forward. But since I want to implement historical and live data I’m looking for a way to distinguish between historical timeframes and “now” based timeframes.
So if the User selects a range like “last 5 Minutes” I want to register a streaming channel. When he selects a range in the past I don’t want.
For now it seams that the only possibility is to look if the “q.TimeRange.To” value is near to a “now” timestamp. Is there a flag where I can detect if the selected range is now based? Or what is the best practice approach here?