testing ratelimit
This commit is contained in:
parent
95b1381480
commit
a616c92656
14 changed files with 411 additions and 3 deletions
|
|
@ -5,6 +5,15 @@
|
|||
|
||||
import type { JobHandler, ScheduledJob } from '@stock-bot/types';
|
||||
|
||||
/**
|
||||
* Rate limit configuration
|
||||
*/
|
||||
export interface RateLimitConfig {
|
||||
points: number;
|
||||
duration: number;
|
||||
blockDuration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metadata for a single operation within a handler
|
||||
*/
|
||||
|
|
@ -12,6 +21,7 @@ export interface OperationMetadata {
|
|||
name: string;
|
||||
method: string;
|
||||
description?: string;
|
||||
rateLimit?: RateLimitConfig | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -35,6 +45,7 @@ export interface HandlerMetadata {
|
|||
schedules?: ScheduleMetadata[];
|
||||
version?: string;
|
||||
description?: string;
|
||||
rateLimit?: RateLimitConfig | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue