struct Redis::TimeSeries(Runnable)
- Redis::TimeSeries(Runnable)
- Struct
- Value
- Object
Overview
Time-series support for Redis using the RedisTimeSeries module.
require "redis"
require "redis/time_series"
EXPERIMENTAL Support for the Redis TimeSeries module is subject to change.
Defined in:
time_series.crInstance Method Summary
- #add(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)
- #add(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)
- #aggregation(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)
- #create(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)
- #get(key : String)
- #info(key : String)
- #mrange(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)
- #mrange(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)
- #queryindex(filter : String)
- #range(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> )
Instance Method Detail
def add(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)
#
def add(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)
#
def aggregation(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil)
#
def create(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil)
#
def mrange(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)
#
def mrange(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil)
#