EntityResource
Constructors
Kubernetes
makeK8sPod
Added in v1.0.0
Source
Signature
declare const makeK8sPod: (
spec: v1.Pod,
options?: {
readonly idleTimeToLive?: Duration.DurationInput;
},
) => Effect.Effect<
EntityResource<K8sHttpClient.PodStatus>,
never,
Scope.Scope | Sharding | Entity.CurrentAddress | K8sHttpClient.K8sHttpClient
>;Models
EntityResource interface
Added in v1.0.0
Source
Signature
interface EntityResource<out A, out E = never> {
readonly "~@effect/cluster/EntityResource": "~@effect/cluster/EntityResource";
readonly close: Effect<void>;
readonly get: Effect<A, E, Scope>;
}Scope
CloseScope
Added in v1.0.0
Source
A Scope that is only closed when the resource is explicitly closed.
It is not closed during restarts, due to shard movement or node shutdowns.
Signature
declare class CloseScope extends any {
constructor();
}
A
EntityResourceis 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
closeeffect is called.By default, the
idleTimeToLiveis infinite, meaning the resource will only be released whencloseis called.