Peer pick failed (timeout / connect / RPC) — not the same as ready: false.
models
Source src/FleetHealth.ts:701 lines
export class class Unreachableclass Unreachable {
_tag: 'Unreachable';
}
Peer pick failed (timeout / connect / RPC) — not the same as ready: false.
Unreachable extends import SchemaSchema.const TaggedClass: <Unreachable, {}>(identifier?: string) => {
<Tag, Fields>(tag: Tag, fields: Fields, annotations?: Schema.Annotations.Declaration<Unreachable, readonly [Schema.TaggedStruct<Tag, Fields>]> | undefined): Schema.Class<Unreachable, Schema.TaggedStruct<Tag, Fields>, {}>;
<Tag, S>(tag: Tag, schema: S, annotations?: Schema.Annotations.Declaration<Unreachable, readonly [Schema.Struct<{ [K in keyof ({
readonly _tag: Schema.tag<Tag>;
} & S["fields"])]: ({
readonly _tag: Schema.tag<Tag>;
} & S["fields"])[K]; }>]> | undefined): Schema.Class<...>;
}
Defines a schema-backed class with an automatically populated _tag field.
When to use
Use to define class instances that are validated by a schema and participate
in tagged union matching.
Details
The optional identifier parameter overrides the schema identifier;
it defaults to the tag value.
Example (Defining a tagged class)
import { Schema } from "effect"
class Circle extends Schema.TaggedClass<Circle>()("Circle", {
radius: Schema.Number
}) {}
const c = new Circle({ radius: 5 })
console.log(c._tag) // "Circle"
console.log(c.radius) // 5
TaggedClass<class Unreachableclass Unreachable {
_tag: 'Unreachable';
}
Peer pick failed (timeout / connect / RPC) — not the same as ready: false.
Unreachable>()("Unreachable", {}) {}
Referenced by 1 symbols