CustomQueueLayerConfig<A, E, R, RR>Worker/layer config for a toolkit custom queue (tag carries itemSchema).
export type type CustomQueueLayerConfig<
A,
E,
R,
RR = never
> = Omit<
CustomQueueHyperlinkConfigWithItemSchema<
A,
E,
R
>,
"itemSchema" | "refill" | "name"
> & {
readonly refill?: {
readonly onStart?: boolean
readonly onDrained?: boolean
readonly load: (
queue: CustomQueueHandle<
A,
E,
QueueEnqueueErrors,
never
>
) => Effect.Effect<void, never, RR>
}
}
Worker/layer config for a toolkit custom queue (tag carries itemSchema).
CustomQueueLayerConfig<function (type parameter) A in type CustomQueueLayerConfig<A, E, R, RR = never>A, function (type parameter) E in type CustomQueueLayerConfig<A, E, R, RR = never>E, function (type parameter) R in type CustomQueueLayerConfig<A, E, R, RR = never>R, function (type parameter) RR in type CustomQueueLayerConfig<A, E, R, RR = never>RR = never> = type Omit<T, K extends keyof any> = {
[P in Exclude<keyof T, K>]: T[P]
}
Construct a type with the properties of T except for those in type K.
Omit<
import CustomQueueHyperlinkConfigWithItemSchemaCustomQueueHyperlinkConfigWithItemSchema<function (type parameter) A in type CustomQueueLayerConfig<A, E, R, RR = never>A, function (type parameter) E in type CustomQueueLayerConfig<A, E, R, RR = never>E, function (type parameter) R in type CustomQueueLayerConfig<A, E, R, RR = never>R>,
"itemSchema" | "refill" | "name"
> & {
readonly refill?: | {
readonly onStart?: boolean
readonly onDrained?: boolean
readonly load: (
queue: CustomQueueHandle<
A,
E,
QueueEnqueueErrors,
never
>
) => Effect.Effect<void, never, RR>
}
| undefined
refill?: {
readonly onStart?: boolean | undefinedonStart?: boolean;
readonly onDrained?: boolean | undefinedonDrained?: boolean;
readonly load: (
queue: CustomQueueHandle<
A,
E,
QueueEnqueueErrors,
never
>
) => Effect.Effect<void, never, RR>
load: (
queue: CustomQueueHandle<
A,
E,
QueueEnqueueErrors,
never
>
queue: import CustomQueueHandleCustomQueueHandle<function (type parameter) A in type CustomQueueLayerConfig<A, E, R, RR = never>A, function (type parameter) E in type CustomQueueLayerConfig<A, E, R, RR = never>E, import QueueEnqueueErrorsQueueEnqueueErrors, never>,
) => 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<void, never, function (type parameter) RR in type CustomQueueLayerConfig<A, E, R, RR = never>RR>;
};
};