<
Self,
F extends CustomQueueItemFields = CustomQueueItemFields,
E = never,
R = never,
RR = never
>(
tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>,
config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>
): anyAlias of serveRemote.
export const const serveRemoteMemory: <
Self,
F extends CustomQueueItemFields = CustomQueueItemFields,
E = never,
R = never,
RR = never
>(
tag: HyperlinkTag<
Self,
CustomQueueInstanceSpec<F>
>,
config: CustomQueueLayerConfig<
Schema.Struct<F>["Type"],
E,
R,
RR
>
) => any
Alias of
serveRemote
.
serveRemoteMemory = <
function (type parameter) Self in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anySelf,
function (type parameter) F in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyF extends type CustomQueueItemFields = {
[x: string]: Schema.Codec<
unknown,
unknown,
never,
never
>
}
CustomQueueItemFields = type CustomQueueItemFields = {
[x: string]: Schema.Codec<
unknown,
unknown,
never,
never
>
}
CustomQueueItemFields,
function (type parameter) E in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyE = never,
function (type parameter) R in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyR = never,
function (type parameter) RR in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyRR = never,
>(
tag: HyperlinkTag<
Self,
CustomQueueInstanceSpec<F>
>
tag: import HyperlinkTagHyperlinkTag<function (type parameter) Self in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anySelf, type CustomQueueInstanceSpec<
F extends Schema.Struct.Fields
> = Omit<
{
add: any
enqueue: any
release: any
releaseEncoded: any
deadLetter: any
drop: any
events: any
status: any
size: any
isEmpty: any
levelSizes: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
},
"add"
> & {
readonly add: CustomQueueAddMethod
}
Full custom-queue instance contract for itemSchema F.
CustomQueueInstanceSpec<function (type parameter) F in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyF>>,
config: CustomQueueLayerConfig<
Schema.Struct<F>["Type"],
E,
R,
RR
>
config: 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<import SchemaSchema.interface Struct<Fields extends Schema.Struct.Fields>Defines a struct schema from a map of field schemas.
Details
Each field value is a schema. Use
optionalKey
or
optional
to
mark fields as optional, and
mutableKey
to mark them as mutable.
The resulting schema's Type is a readonly object type with the fields'
decoded types. The Encoded form mirrors the field schemas' encoded types.
Example (Defining a basic struct)
import { Schema } from "effect"
const Person = Schema.Struct({
name: Schema.String,
age: Schema.Number,
email: Schema.optionalKey(Schema.String)
})
// { readonly name: string; readonly age: number; readonly email?: string }
type Person = typeof Person.Type
const alice = Schema.decodeUnknownSync(Person)({ name: "Alice", age: 30 })
console.log(alice)
// { name: 'Alice', age: 30 }
Namespace for struct field type utilities.
Details
These types compute the decoded Type, encoded Encoded, and constructor
input MakeIn of a
Struct
from its field map, handling optional,
mutable, and other field modifiers automatically.
Struct.Fields — constraint for the field map object
Struct.Type<F> — decoded type of the struct
Struct.Encoded<F> — encoded type of the struct
Struct.MakeIn<F> — constructor input (optional/defaulted fields may be omitted)
Struct.DecodingServices<F> / Struct.EncodingServices<F> — required services
Type-level representation returned by
Struct
.
Struct<function (type parameter) F in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyF>["Type"], function (type parameter) E in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyE, function (type parameter) R in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyR, function (type parameter) RR in <Self, F extends CustomQueueItemFields = CustomQueueItemFields, E = never, R = never, RR = never>(tag: HyperlinkTag<Self, CustomQueueInstanceSpec<F>>, config: CustomQueueLayerConfig<Schema.Struct<F>["Type"], E, R, RR>): anyRR>,
) => const serveRemote: <
Self,
F extends CustomQueueItemFields = CustomQueueItemFields,
E = never,
R = never,
RR = never
>(
tag: HyperlinkTag<
Self,
CustomQueueInstanceSpec<F>
>,
config: CustomQueueLayerConfig<
Schema.Struct<F>["Type"],
E,
R,
RR
>
) => any
Serve this custom queue remotely (served-only) — the engine-running counterpart to
Hyperlink.serveRemote
. Mounts the queue's RPC handlers and registers into
Hyperlink.servedHyperlinksLayer
without granting the local instance, preserving the worker
requirement R for per-resource Layer.provide. For a pure gateway/edge; use
serve
when the
serving node also drives the queue.
Soft-defaults
Store.Storage
. Override with Layer.provide / provideMerge(AppStore).
serveRemote(tag: HyperlinkTag<
Self,
CustomQueueInstanceSpec<F>
>
tag, config: CustomQueueLayerConfig<
Schema.Struct<F>["Type"],
E,
R,
RR
>
config) as any;