ProcessLayerConfig<A, E, R>Config for layer / serve / serveRemote. The effect is the work each run
performs; its success is captured into result when the tag is value-returning. Scheduling comes
from the tag now (Process.schedule(...)), not the config.
export interface interface ProcessLayerConfig<A, E, R>Config for
layer
/
serve
/
serveRemote
. The effect is the work each run
performs; its success is captured into result when the tag is value-returning. Scheduling comes
from the tag now (Process.schedule(...)), not the config.
ProcessLayerConfig<function (type parameter) A in ProcessLayerConfig<A, E, R>A, function (type parameter) E in ProcessLayerConfig<A, E, R>E, function (type parameter) R in ProcessLayerConfig<A, E, R>R> {
readonly ProcessLayerConfig<A, E, R>.effect: Effect.Effect<A, E, R>(property) ProcessLayerConfig<A, E, R>.effect: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
effect: import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<function (type parameter) A in ProcessLayerConfig<A, E, R>A, function (type parameter) E in ProcessLayerConfig<A, E, R>E, function (type parameter) R in ProcessLayerConfig<A, E, R>R>;
/** Optional polling layer for in-instance repeat cadence. */
readonly ProcessLayerConfig<A, E, R>.polling?: Layer.Layer<PollingTag, never, never> | undefinedOptional polling layer for in-instance repeat cadence.
polling?: import LayerLayer.interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<import PollingTagPollingTag, never, never>;
}