Skip to content

Commit 242d6e0

Browse files
author
Theodore Li
committed
Refactor hosted key handling. Add optimistic handling of throttling for custom throttle rules.
1 parent 693a3d3 commit 242d6e0

File tree

18 files changed

+961
-418
lines changed

18 files changed

+961
-418
lines changed

apps/sim/lib/core/hosted-key-throttler/index.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

apps/sim/lib/core/hosted-key-throttler/throttler.test.ts

Lines changed: 0 additions & 132 deletions
This file was deleted.

apps/sim/lib/core/hosted-key-throttler/throttler.ts

Lines changed: 0 additions & 202 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export {
2+
getHostedKeyRateLimiter,
3+
HostedKeyRateLimiter,
4+
resetHostedKeyRateLimiter,
5+
} from './rate-limiter'
6+
export {
7+
DEFAULT_BURST_MULTIPLIER,
8+
DEFAULT_WINDOW_MS,
9+
toTokenBucketConfig,
10+
type AcquireKeyResult,
11+
type CustomRateLimit,
12+
type HostedKeyRateLimitConfig,
13+
type HostedKeyRateLimitMode,
14+
type PerRequestRateLimit,
15+
type RateLimitDimension,
16+
type ReportUsageResult,
17+
} from './types'

0 commit comments

Comments
 (0)