Arduino-Redis
A Redis library for Arduino.
|
Redis-for-Arduino client interface.
The sole constructor takes a reference to any instance of a Client subclass, allowing it to be used with any library that abstracts the client bytestream in this way (such as the built-in Ethernet class or the WiFiClient for devices such as the ESP8266).
Public Member Functions | |
Redis (Client &client) | |
Redis (const Redis &)=delete | |
Redis & | operator= (const Redis &)=delete |
RedisReturnValue | authenticate (const char *password) |
bool | set (const char *key, const char *value) |
String | get (const char *key) |
bool | del (const char *key) |
bool | exists (const char *key) |
int | append (const char *key, const char *value) |
int | publish (const char *channel, const char *message) |
bool | expire (const char *key, int seconds) |
bool | expire_at (const char *key, int timestamp) |
bool | pexpire (const char *key, int ms) |
bool | pexpire_at (const char *key, int timestamp) |
bool | persist (const char *key) |
int | ttl (const char *key) |
int | pttl (const char *key) |
bool | hset (const char *key, const char *field, const char *value) |
bool | hsetnx (const char *key, const char *field, const char *value) |
String | hget (const char *key, const char *field) |
bool | hdel (const char *key, const char *field) |
int | hlen (const char *key) |
int | hstrlen (const char *key, const char *field) |
bool | hexists (const char *key, const char *field) |
#include <Redis.h>
|
inline |
int Redis::append | ( | const char * | key, |
const char * | value | ||
) |
RedisReturnValue Redis::authenticate | ( | const char * | password | ) |
bool Redis::del | ( | const char * | key | ) |
bool Redis::exists | ( | const char * | key | ) |
|
inline |
|
inline |
Expire a key
at UNIX timestamp timestamp
(seconds since January 1, 1970).
key | The key name for which to set expire time. |
timestamp | The UNIX timestamp at which this key will expire. |
true
if the expire time was set successfully, false
otherwise. String Redis::get | ( | const char * | key | ) |
bool Redis::hdel | ( | const char * | key, |
const char * | field | ||
) |
bool Redis::hexists | ( | const char * | key, |
const char * | field | ||
) |
String Redis::hget | ( | const char * | key, |
const char * | field | ||
) |
int Redis::hlen | ( | const char * | key | ) |
|
inline |
|
inline |
int Redis::hstrlen | ( | const char * | key, |
const char * | field | ||
) |
bool Redis::persist | ( | const char * | key | ) |
|
inline |
|
inline |
Expire a key
at UNIX timestamp timestamp
(milliseconds since January 1, 1970).
key | The key name for which to set expire time. |
timestamp | The UNIX timestamp at which this key will expire. |
true
if the expire time was set successfully, false
otherwise.
|
inline |
int Redis::publish | ( | const char * | channel, |
const char * | message | ||
) |
bool Redis::set | ( | const char * | key, |
const char * | value | ||
) |
Set key
to value
.
key | The key name to set |
value | The value to set for key |
true
if key
was set to value
, false if error.
|
inline |