Package: @effect/cluster
Module: EntityResource
A EntityResource is a resource that can be acquired inside a cluster
entity, which will keep the entity alive even across restarts.
The resource will only be fully released when the idle time to live is
reached, or when the close effect is called.
By default, the idleTimeToLive is infinite, meaning the resource will only
be released when close is called.
Signature
declare const make: <A, E, R>(options: { readonly acquire: Effect.Effect<A, E, R>; readonly idleTimeToLive?: Duration.DurationInput | undefined; }) => Effect.Effect<EntityResource<A, E>, E, Scope.Scope | Exclude<R, CloseScope> | Sharding | Entity.CurrentAddress>
Since v1.0.0