@rnw-community/nestjs-enterprise
v1.14.1
Published
NestJS Enterprise is a collection of enterprise-grade modules for NestJS.
Maintainers
Readme
NestJS Enterprise
NestJS enterprise is a collection of tools and utilities to help you build enterprise-grade applications with NestJS.
Installation
Add @rnw-community/nestjs-enterprise to your project using you package manager of choice.
Peer dependencies that your project should contain:
- @nestjs/common
^10.2.7, - RxJS
^7.8.1
Some features have additional installation requirements, please refer to the feature documentation for more information.
Contents
Decorators
- Log - method call logging
- Histogram Metric - Prometheus histogram metrics
Distributed Locking
Create lock decorators bound to any injectable LockServiceInterface via NestJS DI:
const { SequentialLock, ExclusiveLock } = createPromiseLockDecorators(MyLockService, 5000);
const { SequentialLock$, ExclusiveLock$ } = createObservableLockDecorators(MyLockService, 5000);- createPromiseLockDecorators -
SequentialLock+ExclusiveLockfor async methods - createObservableLockDecorators -
SequentialLock$+ExclusiveLock$for Observable methods
Deprecated
- LockPromise - use
createPromiseLockDecoratorsinstead - LockObservable - use
createObservableLockDecoratorsinstead - LockableService - use
LockServiceInterfaceinstead
License
This library is licensed under The MIT License.
