{
status: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.Struct<{
readonly sizes: Schema.Struct<{
readonly high: Schema.Number
readonly normal: Schema.Number
readonly low: Schema.Number
}>
readonly paused: Schema.Boolean
readonly inFlight: Schema.Number
readonly completed: Schema.Number
readonly phase: Schema.Literals<
readonly ["running", "draining", "off"]
>
}>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
size: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.Number,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
isEmpty: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.Boolean,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
start: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
pause: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
resume: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
shutdown: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
clear: Hyperlink.Method<
undefined,
Schema.Number,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
metrics: {
stream: Hyperlink.Method<
undefined,
Schema.Struct<{
readonly windowStart: Schema.DateTimeUtc
readonly windowEnd: Schema.DateTimeUtc
readonly windowMillis: Schema.Number
readonly enqueued: Schema.Number
readonly started: Schema.Number
readonly completed: Schema.Number
readonly failed: Schema.Number
readonly retried: Schema.Number
readonly deadLettered: Schema.Number
readonly dropped: Schema.Number
readonly rateLimitExceeded: Schema.Number
readonly inFlight: Schema.Number
readonly throughputPerSec: Schema.Number
readonly avgWaitMillis: Schema.Struct<{
readonly high: Schema.optionalKey<Schema.Number>
readonly normal: Schema.optionalKey<Schema.Number>
readonly low: Schema.optionalKey<Schema.Number>
}>
readonly avgExecutionMillis: Schema.optionalKey<Schema.Number>
readonly avgTotalMillis: Schema.optionalKey<Schema.Number>
}>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
query: Hyperlink.Method<
{
limit: Schema.optionalKey<Schema.Number>
since: Schema.optionalKey<Schema.DateTimeUtc>
until: Schema.optionalKey<Schema.DateTimeUtc>
},
Schema.$Array<
Schema.Struct<{
readonly windowStart: Schema.DateTimeUtc
readonly windowEnd: Schema.DateTimeUtc
readonly windowMillis: Schema.Number
readonly enqueued: Schema.Number
readonly started: Schema.Number
readonly completed: Schema.Number
readonly failed: Schema.Number
readonly retried: Schema.Number
readonly deadLettered: Schema.Number
readonly dropped: Schema.Number
readonly rateLimitExceeded: Schema.Number
readonly inFlight: Schema.Number
readonly throughputPerSec: Schema.Number
readonly avgWaitMillis: Schema.Struct<{
readonly high: Schema.optionalKey<Schema.Number>
readonly normal: Schema.optionalKey<Schema.Number>
readonly low: Schema.optionalKey<Schema.Number>
}>
readonly avgExecutionMillis: Schema.optionalKey<Schema.Number>
readonly avgTotalMillis: Schema.optionalKey<Schema.Number>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
}
}The queue control + observation contract: the fixed-schema verbs of a queue handle,
shared by every queue instance. The data-plane (item-typed) verbs are added in a later
slice. Mirrors the matching members of QueueHyperlink's QueueHandleApi.
export const const queueControlSpec: {
status: any
size: any
isEmpty: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
}
The queue control + observation contract: the fixed-schema verbs of a queue handle,
shared by every queue instance. The data-plane (item-typed) verbs are added in a later
slice. Mirrors the matching members of QueueHyperlink's QueueHandleApi.
queueControlSpec = {
// ── live current state — one SubscriptionRef-backed source of truth ──
// `status` is the whole snapshot; the scalars are `Stream.map` derivations of it (SSOT). All are
// plain reads (`p.size`) and subscribable (`Hyperlink.changes(p, (s) => s.size)`).
status: anystatus: import HyperlinkHyperlink.ref(const queueStatus: Schema.Struct<{
readonly sizes: Schema.Struct<{
readonly high: Schema.Number
readonly normal: Schema.Number
readonly low: Schema.Number
}>
readonly paused: Schema.Boolean
readonly inFlight: Schema.Number
readonly completed: Schema.Number
readonly phase: Schema.Literals<
readonly ["running", "draining", "off"]
>
}>
const queueStatus: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number }>; readonly paused: Schema.Boolean; readonly inFlight: Schema.Number; readonly completed: Schema.Numb…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.ReadonlySide<{ readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number; }>; readonly paused: Schema.Boolean; readonly i…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.ReadonlySide<{ readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number }>; readonly paused: Schema.Boolean; readonly inFli…;
check: (checks_0: Check<Schema.Struct.ReadonlySide<{ readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number }>; readonly paused: Schema.Boolean; readonly inFlight: Schema.Number; …;
rebuild: (ast: Objects) => Schema.Struct<{ readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number }>; readonly paused: Schema.Boolean; readonly inFlight: Schema.Number; readonly com…;
make: (input: Schema.Struct.ReadonlyMakeIn<{ readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number }>; readonly paused: Schema.Boolean; readonly inFlight: Schema.Number; readonl…;
makeOption: (input: Schema.Struct.ReadonlyMakeIn<{ readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number }>; readonly paused: Schema.Boolean; readonly inFlight: Schema.Number; readonl…;
makeEffect: (input: Schema.Struct.ReadonlyMakeIn<{ readonly sizes: Schema.Struct<{ readonly high: Schema.Number; readonly normal: Schema.Number; readonly low: Schema.Number }>; readonly paused: Schema.Boolean; readonly inFlight: Schema.Number; readonl…;
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; <…;
}
A queue's current-state snapshot — the element of the status stream. Instantaneous
truth (what is), kept small and encodable (it crosses RPC). One snapshot a dashboard
atom / CLI --watch / TUI renders. Distinct from events (discrete facts) and metrics
(windowed aggregates).
queueStatus).annotate({
description: stringdescription:
"Live current-state snapshot: per-priority sizes, paused, in-flight, completed, phase.",
}),
size: anysize: import HyperlinkHyperlink.ref(import SchemaSchema.const Number: Schema.Numberconst Number: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<number, readonly []>) => Schema.Number;
annotateKey: (annotations: Schema.Annotations.Key<number>) => Schema.Number;
check: (checks_0: Check<number>, ...checks: Array<Check<number>>) => Schema.Number;
rebuild: (ast: Number) => Schema.Number;
make: (input: number, options?: Schema.MakeOptions) => number;
makeOption: (input: number, options?: Schema.MakeOptions) => Option.Option<number>;
makeEffect: (input: number, options?: Schema.MakeOptions) => Effect.Effect<number, Schema.SchemaError, never>;
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; <…;
}
Type-level representation of
Number
.
Schema for number values, including NaN, Infinity, and -Infinity.
Details
Default JSON serializer:
- Finite numbers are serialized as numbers.
- Non-finite values are serialized as strings (
"NaN", "Infinity", "-Infinity").
Number).annotate({
description: stringdescription: "Total pending items across all priority levels.",
}),
isEmpty: anyisEmpty: import HyperlinkHyperlink.ref(import SchemaSchema.const Boolean: Schema.Booleanconst Boolean: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<boolean, readonly []>) => Schema.Boolean;
annotateKey: (annotations: Schema.Annotations.Key<boolean>) => Schema.Boolean;
check: (checks_0: Check<boolean>, ...checks: Array<Check<boolean>>) => Schema.Boolean;
rebuild: (ast: Boolean) => Schema.Boolean;
make: (input: boolean, options?: Schema.MakeOptions) => boolean;
makeOption: (input: boolean, options?: Schema.MakeOptions) => Option.Option<boolean>;
makeEffect: (input: boolean, options?: Schema.MakeOptions) => Effect.Effect<boolean, Schema.SchemaError, never>;
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; <…;
}
Type-level representation of
Boolean
.
Schema for boolean values. Validates that the input is typeof "boolean".
When to use
Use to validate values that are already JavaScript booleans.
Boolean).annotate({
description: stringdescription: "Whether all priority queues are empty.",
}),
// ── lifecycle commands ──
start: anystart: import HyperlinkHyperlink.effect(import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.SchemaError, never>;
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; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void).annotate({
description: stringdescription:
"Fork the worker pool + lifecycle monitor (idempotent; no-op after shutdown).",
}),
pause: anypause: import HyperlinkHyperlink.effect(import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.SchemaError, never>;
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; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void).annotate({
description: stringdescription: "Pause processing; items can still be enqueued and accumulate.",
}),
resume: anyresume: import HyperlinkHyperlink.effect(import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.SchemaError, never>;
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; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void).annotate({
description: stringdescription: "Resume processing after a pause.",
}),
shutdown: anyshutdown: import HyperlinkHyperlink.effect(import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.SchemaError, never>;
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; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void).annotate({
description: stringdescription:
"Permanently stop the queue (graceful): phase → draining, later enqueues dropped, " +
"in-flight finishes, queued items drained or discarded per shutdownMode, then phase → off.",
destructive: booleandestructive: true,
}),
clear: anyclear: import HyperlinkHyperlink.effect(import SchemaSchema.const Number: Schema.Numberconst Number: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<number, readonly []>) => Schema.Number;
annotateKey: (annotations: Schema.Annotations.Key<number>) => Schema.Number;
check: (checks_0: Check<number>, ...checks: Array<Check<number>>) => Schema.Number;
rebuild: (ast: Number) => Schema.Number;
make: (input: number, options?: Schema.MakeOptions) => number;
makeOption: (input: number, options?: Schema.MakeOptions) => Option.Option<number>;
makeEffect: (input: number, options?: Schema.MakeOptions) => Effect.Effect<number, Schema.SchemaError, never>;
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; <…;
}
Type-level representation of
Number
.
Schema for number values, including NaN, Infinity, and -Infinity.
Details
Default JSON serializer:
- Finite numbers are serialized as numbers.
- Non-finite values are serialized as strings (
"NaN", "Infinity", "-Infinity").
Number).annotate({
description: stringdescription:
"Drain all pending items and reset the completed counter; returns the count cleared.",
destructive: booleandestructive: true,
}),
// ── observability — stream + query, paired by nesting ──
metrics: {
stream: any
query: any
}
metrics: {
stream: anystream: import HyperlinkHyperlink.stream(const queueMetrics: Schema.Struct<{
readonly windowStart: Schema.DateTimeUtc;
readonly windowEnd: Schema.DateTimeUtc;
readonly windowMillis: Schema.Number;
readonly enqueued: Schema.Number;
readonly started: Schema.Number;
readonly completed: Schema.Number;
readonly failed: Schema.Number;
readonly retried: Schema.Number;
readonly deadLettered: Schema.Number;
readonly dropped: Schema.Number;
readonly rateLimitExceeded: Schema.Number;
readonly inFlight: Schema.Number;
readonly throughputPerSec: Schema.Number;
readonly avgWaitMillis: Schema.Struct<...>;
readonly avgExecutionMillis: Schema.optionalKey<...>;
readonly avgTotalMillis: Schema.optionalKey<...>;
}>
const queueMetrics: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly windowStart: Schema.DateTimeUtc; readonly windowEnd: Schema.DateTimeUtc; readonly windowMillis: Schema.Number; readonly enqueued: Schema.Number; readonly started: Schema.Number; readonly completed: Schema.Number; re…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined; }; read…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly…;
check: (checks_0: Check<{ readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTi…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly windowStart: Schema.DateTimeUtc; readonly windowEnd: Schema.DateTimeUtc; readonly windowMillis: Schema.Number; readonly enqueued: Schema.Number; readonly started: Schema.Number; readonly completed…;
make: (input: { readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTime.Utc; r…;
makeOption: (input: { readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTime.Utc; r…;
makeEffect: (input: { readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTime.Utc; r…;
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; <…;
}
Windowed queue metrics — the element of the metrics stream, emitted once per window.
Counts are per-window deltas; gauges/derived values are as-of the window end. Separate from
status (instantaneous) and events (discrete) because aggregates are inherently
time-bucketed.
queueMetrics).annotate({
description: stringdescription:
"Windowed metrics (per-window counts + throughput/latency) emitted once per window.",
}),
query: anyquery: import HyperlinkHyperlink.effectFn(const historyQuery: {
limit: Schema.optionalKey<Schema.Number>
since: Schema.optionalKey<Schema.DateTimeUtc>
until: Schema.optionalKey<Schema.DateTimeUtc>
}
Payload fields for the metrics.query history read — newest limit entries within an optional
[since, until] window.
historyQuery, import SchemaSchema.Array<Schema.Struct<{
readonly windowStart: Schema.DateTimeUtc;
readonly windowEnd: Schema.DateTimeUtc;
readonly windowMillis: Schema.Number;
readonly enqueued: Schema.Number;
readonly started: Schema.Number;
readonly completed: Schema.Number;
readonly failed: Schema.Number;
readonly retried: Schema.Number;
readonly deadLettered: Schema.Number;
readonly dropped: Schema.Number;
readonly rateLimitExceeded: Schema.Number;
readonly inFlight: Schema.Number;
readonly throughputPerSec: Schema.Number;
readonly avgWaitMillis: Schema.Struct<...>;
readonly avgExecutionMillis: Schema.optionalKey<...>;
readonly avgTotalMillis: Schema.optionalKey<...>;
}>>(self: Schema.Struct<...>): Schema.$Array<...>
export Array
Defines a ReadonlyArray schema for a given element schema.
Example (Defining an array of strings)
import { Schema } from "effect"
const schema = Schema.Array(Schema.String)
const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
console.log(result)
// [ 'a', 'b', 'c' ]
Array(const queueMetrics: Schema.Struct<{
readonly windowStart: Schema.DateTimeUtc;
readonly windowEnd: Schema.DateTimeUtc;
readonly windowMillis: Schema.Number;
readonly enqueued: Schema.Number;
readonly started: Schema.Number;
readonly completed: Schema.Number;
readonly failed: Schema.Number;
readonly retried: Schema.Number;
readonly deadLettered: Schema.Number;
readonly dropped: Schema.Number;
readonly rateLimitExceeded: Schema.Number;
readonly inFlight: Schema.Number;
readonly throughputPerSec: Schema.Number;
readonly avgWaitMillis: Schema.Struct<...>;
readonly avgExecutionMillis: Schema.optionalKey<...>;
readonly avgTotalMillis: Schema.optionalKey<...>;
}>
const queueMetrics: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly windowStart: Schema.DateTimeUtc; readonly windowEnd: Schema.DateTimeUtc; readonly windowMillis: Schema.Number; readonly enqueued: Schema.Number; readonly started: Schema.Number; readonly completed: Schema.Number; re…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined; }; read…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly…;
check: (checks_0: Check<{ readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTi…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly windowStart: Schema.DateTimeUtc; readonly windowEnd: Schema.DateTimeUtc; readonly windowMillis: Schema.Number; readonly enqueued: Schema.Number; readonly started: Schema.Number; readonly completed…;
make: (input: { readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTime.Utc; r…;
makeOption: (input: { readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTime.Utc; r…;
makeEffect: (input: { readonly inFlight: number; readonly completed: number; readonly avgWaitMillis: { readonly high?: number | undefined; readonly normal?: number | undefined; readonly low?: number | undefined }; readonly windowStart: DateTime.Utc; r…;
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; <…;
}
Windowed queue metrics — the element of the metrics stream, emitted once per window.
Counts are per-window deltas; gauges/derived values are as-of the window end. Separate from
status (instantaneous) and events (discrete) because aggregates are inherently
time-bucketed.
queueMetrics)).annotate({
description: stringdescription:
"Past windowed metrics from the HistoryStore (newest `limit` within `since`/`until`); " +
"empty unless a HistoryStore layer is provided.",
}),
},
};