@forts/resilience4ts-timeout
v0.0.1
Published
Timeout decorators for @forts/resilience4ts
Downloads
2
Readme
@forts/resilience4ts-timeout
Timeout pattern implementation for resilience4ts.
Installation
npm install @forts/resilience4ts-timeout
Usage
import { Timeout } from '@forts/resilience4ts-timeout';
const timeout = Timeout.of('my-timeout', {
timeout: 1000,
});
const result = await timeout.on(async () => {
// do something
});
Options
const timeout = Timeout.of('my-timeout', {
timeout: 1000, // Timeout in milliseconds.
});