0.0
No release in over 3 years
Low commit activity in last 3 years
Ruby client for Redis Timeseries, a redis add-on module.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 4
 Project Readme

Redistimeseries

Ruby Gem

Installation

Add this line to your application's Gemfile:

gem 'redistimeseries'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install redistimeseries

Usage

RedisTimeSeries gem uses Ruby's refinement to add timeseries methods to the Redis gem.

You need to include the line

require 'redistimeseries'
using Redistimeseries::RedisRefinement

client = Redis.new
client.ts_create(key: "mytimeseries")
client.ts_add(key: "mytimeseries", value: 141)
client.ts_get("mytimeseries")

Methods - see redis_refinement.rb

ts_create(key:, retention: nil, uncompressed: false, labels: [])
ts_add(key:, timestamp: "*", value:, retention: nil, labels: [])
ts_madd(key:, timestamp: "*", value:)
ts_range(key:, from: 0, to: nil, count: nil, aggtype: nil, timebucket: nil)
ts_info(key:)

todo

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/eadz/redistimeseries.

Code of Conduct

Everyone interacting in the Redistimeseries project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.