MCPcopy Create free account
hub / github.com/Effect-TS/effect / getState

Function getState

packages/effect/src/unstable/http/HttpClient.ts:1124–1131  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

1122 const headerNames = resolveRateLimiterHeaderNames(options.responseHeaders)
1123
1124 const getState = (key: string): RateLimiterState => {
1125 const current = states.get(key)
1126 if (current !== undefined) {
1127 return current
1128 }
1129 states.set(key, initialState)
1130 return initialState
1131 }
1132
1133 const onResponse = options.disableResponseInspection
1134 ? undefined

Callers 1

HttpClient.tsFile · 0.70

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected