Commit ff5727f8 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

doc: redis api

parent b07f0bea
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -30,7 +30,23 @@ here be dragons

### Redis API

here be dragons
You can put your events directly into FnordMetric's internal queue in redis
with the redis client of your choice. It is important that these commands
are executed in this exact order. 

    set     "#{prefix}-event-#{event_id}"   event_data
    lpush   "#{prefix}-queue"               event_id
    expire  "#{prefix}-event-#{event_id}"   event_ttl

This example assumes you have `redis_prefix` set to the default value 
("fnordmetric"). You have to choose a uniqe event id yourself

_Example: push event 123123 to the internal redis queue with a ttl of 10 minutes__

    set     "fnotmetric-event-123123"   "{ \"_type\": \"test\" }"
    lpush   "fnordmetric-queue"         "123"
    expire  "fnordmetric-event-123123"  "600"



### AMQP
@@ -42,3 +58,9 @@ here be dragons

here be dragons


### Client Libraries

There are a number of client libraries for FnordMetric for Ruby, PHP, Pythin, C#,
etcetera. [List of clients](/documentation/examples)