Skip to content

Latest commit

 

History

History
360 lines (240 loc) · 9.01 KB

README.md

File metadata and controls

360 lines (240 loc) · 9.01 KB

RedisSMQ Common Library / Docs / API

API

Table of contents

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

IRedisConfig

Ƭ IRedisConfig: IRedisConfigIORedis | IRedisConfigNodeRedis


TEventBusEvent

Ƭ TEventBusEvent: TEventEmitterEvent & { error: (err: Error) => void }


TEventEmitterEvent

Ƭ TEventEmitterEvent: Record<string, (...args: any[]) => void>


TFunction

Ƭ TFunction<TReturn, TArgs>: (...args: TArgs[]) => TReturn

Type parameters

Name Type
TReturn void
TArgs any

Type declaration

▸ (...args): TReturn

Parameters
Name Type
...args TArgs[]
Returns

TReturn


TLockerEvent

Ƭ TLockerEvent: Object

Type declaration

Name Type
locker.down (id: string) => void
locker.error (error: Error, id: string) => void
locker.goingDown (id: string) => void
locker.goingUp (id: string) => void
locker.up (id: string) => void

TRedisClientEvent

Ƭ TRedisClientEvent: Object

Type declaration

Name Type
end () => void
error (err: Error) => void
message (channel: string, message: string) => void
pmessage (pattern: string, channel: string, message: string) => void
ready () => void

TRedisClientNodeRedis

Ƭ TRedisClientNodeRedis: RedisClientType<RedisModules, RedisFunctions, RedisScripts>


TRedisTransactionNodeRedis

Ƭ TRedisTransactionNodeRedis: RedisClientMultiCommandType<RedisModules, RedisFunctions, RedisScripts>


TTimer

Ƭ TTimer: Object

Type declaration

Name Type
fn TFunction
periodic boolean
timer NodeJS.Timeout

TTimerEvent

Ƭ TTimerEvent: Object

Type declaration

Name Type
error (err: Error) => void

TUnaryFunction

Ƭ TUnaryFunction<T, E>: (reply: T) => E

Type parameters

Name Type
T T
E void

Type declaration

▸ (reply): E

Parameters
Name Type
reply T
Returns

E


TWorkerFn

Ƭ TWorkerFn: (...args: [...any[], ICallback<any>]) => void

Type declaration

▸ (...args): void

Parameters
Name Type
...args [...any[], ICallback<any>]
Returns

void


TWorkerResourceGroupEvent

Ƭ TWorkerResourceGroupEvent: Object

Type declaration

Name Type
workerResourceGroup.error (err: Error) => void

TWorkerThreadError

Ƭ TWorkerThreadError: Object

Type declaration

Name Type
message string
name string

TWorkerThreadMessage

Ƭ TWorkerThreadMessage: Object

Type declaration

Name Type
code TWorkerThreadMessageCode
data? unknown
error? TWorkerThreadError | null

TWorkerThreadMessageCode

Ƭ TWorkerThreadMessageCode: EWorkerThreadExitCode | EWorkerThreadExecutionCode

Variables

async

Const async: Object

Type declaration

Name Type
each <T>(collection: Record<string, T> | T[], iteratee: (item: T, key: string | number, callback: ICallback<void>) => void, callback: ICallback<void>) => void
eachIn <T>(collection: Record<string, T>, iteratee: (item: T, key: string, callback: ICallback<void>) => void, callback: ICallback<void>) => void
eachOf <T>(collection: T[], iteratee: (item: T, key: number, callback: ICallback<void>) => void, callback: ICallback<void>) => void
waterfall <T>(tasks: TFunction[], callback: ICallback<T>) => void

logger

Const logger: Object

Type declaration

Name Type
destroy () => void
getLogger (cfg: ILoggerConfig, ns?: string) => ILogger
setLogger <T>(logger: T) => void

Functions

createRedisClient

createRedisClient(config, cb): void

Parameters

Name Type
config IRedisConfig
cb ICallback<IRedisClient>

Returns

void


getDirname

getDirname(): string

Returns

string