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

Function makeDispatcherOptions

packages/platform/node/src/NodeHttpClient.ts:130–136  ·  view source on GitHub ↗
(
  options?: Undici.Agent.Options | undefined
)

Source from the content-addressed store, hash-verified

128 * @since 4.0.5
129 */
130export const makeDispatcherOptions = (
131 options?: Undici.Agent.Options | undefined
132): Effect.Effect<Undici.Dispatcher, never, Scope.Scope> =>
133 Effect.acquireRelease(
134 Effect.map(loadUndici, (_) => new _.Agent(options)),
135 (dispatcher) => Effect.promise(() => dispatcher.destroy())
136 )
137
138/**
139 * Acquires a new Undici `Agent` dispatcher and destroys it when the enclosing

Callers 1

NodeHttpClient.tsFile · 0.85

Calls 2

mapMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected