(options: {
readonly acquire: Effect<A, E, R>
readonly min: number
readonly max: number
readonly concurrency?: number | undefined
readonly targetUtilization?: number | undefined
readonly timeToLive: Duration.DurationInput
readonly timeToLiveStrategy?: "creation" | "usage" | undefined
})
| 87 | |
| 88 | /** @internal */ |
| 89 | export const makeWithTTL = <A, E, R>(options: { |
| 90 | readonly acquire: Effect<A, E, R> |
| 91 | readonly min: number |
| 92 | readonly max: number |
| 93 | readonly concurrency?: number | undefined |
| 94 | readonly targetUtilization?: number | undefined |
| 95 | readonly timeToLive: Duration.DurationInput |
| 96 | readonly timeToLiveStrategy?: "creation" | "usage" | undefined |
| 97 | }): Effect<Pool<A, E>, never, R | Scope> => |
| 98 | core.flatMap( |
| 99 | options.timeToLiveStrategy === "creation" ? |
| 100 | strategyCreationTTL<A, E>(options.timeToLive) : |
| 101 | strategyUsageTTL<A, E>(options.timeToLive), |
| 102 | (strategy) => makeWith({ ...options, strategy }) |
| 103 | ) |
| 104 | |
| 105 | /** @internal */ |
| 106 | export const get = <A, E>(self: Pool<A, E>): Effect<A, E, Scope> => self.get |
nothing calls this directly
no test coverage detected