redistimeseries-go
redistimeseries-go copied to clipboard
Unexpected type for time in milliseconds
I started to use this library to create an uptime service. While using this lib I noticed it is quite annoying to pass time and duration values in some cases because the accepted value most of the cases is an int or uint instead of time.Time or time.Duration.
RetentionMSecsfield ofCreateOptionsistime.Duration.TimeBucketfield ofRangeOptionsandMultiRangeOptionsisint.fromTimestampandtoTimestampparameter ofRangeWithOptionsisint64.bucketSizeMSecparameter ofCreateRuleisuint.
Furthermore, TimeRangeMinimum and TimeRangeMaximum are ints there for the following code fails to compile:
start := rts.TimeRangeMinimum
end := rts.TimeRangeMaximum
points, err := c.RangeWithOptions("key", start, end, rts.DefaultRangeOptions)
Is it something which could be fixed in a potential v2 in the future?