From b3b7e00aa7168f6c4984aa208b7b6a97965a49a3 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Sat, 8 Dec 2018 19:21:20 -0800 Subject: [PATCH] Add redis notes --- pkg/stats/redis.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/stats/redis.go b/pkg/stats/redis.go index a96d6da..95783ea 100644 --- a/pkg/stats/redis.go +++ b/pkg/stats/redis.go @@ -7,6 +7,16 @@ import ( "github.com/go-redis/redis" ) +// RedisStats implement stats Redis backend +// Inside docker can be connected as: +// docker exec -it redis redis-cli +// View available stats keys +// 127.0.0.1:6379> keys stats/top/* +// Get stats top: +// 127.0.0.1:6379> zrevrange stats/top/2018/12/queries 0 100 withscores +// 127.0.0.1:6379> zrevrange stats/top/2018/12/downloads 0 100 withscores +// Query specific feed stats: +// 127.0.0.1:6379> hgetall "stats/2018/12/p2AZoiTNO" type RedisStats struct { client *redis.Client }