@faasjs/redis
TypeScript icon, indicating that this package has built-in type declarations

0.0.4-beta.2 • Public • Published

@faasjs/redis

License: MIT NPM Stable Version NPM Beta Version

FaasJS's Redis plugin.

Install

npm install @faasjs/redis

Modules

Classes

Type Aliases

Functions

Type Aliases

RedisConfig

Ƭ RedisConfig: Object

Type declaration

Name Type
config? RedisOptions
name? string

Functions

get

get<TResult>(key): Promise<TResult>

Type parameters

Name Type
TResult any

Parameters

Name Type
key string

Returns

Promise<TResult>


getJSON

getJSON<TResult>(key): Promise<TResult>

Type parameters

Name Type
TResult any

Parameters

Name Type
key string

Returns

Promise<TResult>


lock

lock(key, EX?): Promise<void>

Lock by key

Parameters

Name Type Default value Description
key string undefined
EX number 10 expire in seconds, default 10

Returns

Promise<void>


multi

multi(): ChainableCommander

Returns

ChainableCommander


pipeline

pipeline(): ChainableCommander

Returns

ChainableCommander


publish

publish(channel, message): Promise<number>

Publish message

Parameters

Name Type
channel string
message any

Returns

Promise<number>


query

query<TResult>(command, args): Promise<TResult>

Type parameters

Name Type
TResult any

Parameters

Name Type
command string
args any[]

Returns

Promise<TResult>


set

set<TResult>(key, value, options?): Promise<TResult>

Type parameters

Name Type
TResult void

Parameters

Name Type
key string
value any
options? SET

Returns

Promise<TResult>


setJSON

setJSON<TResult>(key, value, options?): Promise<TResult>

Type parameters

Name Type
TResult void

Parameters

Name Type
key string
value any
options? SET

Returns

Promise<TResult>


unlock

unlock(key): Promise<void>

Unlock by key

Parameters

Name Type
key string

Returns

Promise<void>


useRedis

useRedis(config?): UseifyPlugin<Redis>

Parameters

Name Type
config? RedisConfig

Returns

UseifyPlugin<Redis>

Readme

Keywords

none

Package Sidebar

Install

Weekly Downloads

2,611

Version

0.0.4-beta.2

License

MIT

Unpacked Size

25.2 kB

Total Files

7

Last publish

Collaborators

  • zfben