4.0.1 • Published 9 months ago

redis-kv-store v4.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

redis-kv-store

A simple Redis based key/value store.

GitHub license Coverage Status

This simple project provides a key/value store based on Redis. It has the exact same API then the memory-kv-store module and relies on the redis-service module.

API

initRedisKV(services) ⇒ Promise.<RedisKVService>

Instantiate the Redis Key/Value service

Kind: global function
Returns: Promise.<RedisKVService> - A promise of the Redis Key Value service

ParamTypeDescription
servicesObjectThe services to inject
services.redisfunctionA simple-redis-service instance
services.logfunctionA logging function

Example

import initRedisService from 'simple-redis-service';
import initRedisKV from 'redis-kv-store';

const redis = await initRedisService({
  REDIS: {
    host: 'localhost',
    port: 6379,
  },
  ENV: process.env,
  log: console.log.bind(console),
});
const redisKV = await initRedisKV({
  redis,
  log: console.log.bind(console),
});

const value = await redisKV.get('my_key');

Authors

License

MIT

4.0.1

9 months ago

4.0.0

9 months ago

3.0.0

9 months ago

2.0.2

1 year ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago