Skip to content

Latest commit

 

History

History
97 lines (55 loc) · 1.9 KB

File metadata and controls

97 lines (55 loc) · 1.9 KB
id ThrottleStrategy
title ThrottleStrategy

Interface: ThrottleStrategy

Defined in: packages/db/src/strategies/types.ts:86

Throttle strategy that spaces executions evenly over time

Extends

Properties

_type

_type: "throttle";

Defined in: packages/db/src/strategies/types.ts:8

Type discriminator for strategy identification

Inherited from

BaseStrategy._type


cleanup()

cleanup: () => void;

Defined in: packages/db/src/strategies/types.ts:23

Clean up any resources held by the strategy Should be called when the strategy is no longer needed

Returns

void

Inherited from

BaseStrategy.cleanup


execute()

execute: <T>(fn) => void | Promise<void>;

Defined in: packages/db/src/strategies/types.ts:15

Execute a function according to the strategy's timing rules

Type Parameters

T

T extends object = Record<string, unknown>

Parameters

fn

() => Transaction<T>

The function to execute

Returns

void | Promise<void>

The result of the function execution (if applicable)

Inherited from

BaseStrategy.execute


options

options: ThrottleStrategyOptions;

Defined in: packages/db/src/strategies/types.ts:87