Advertise rejected — an incumbent with the same nodeKey still answers NodeStatus ping.
errors
Source src/Lookup.ts:1717 lines
export class class IncumbentAliveclass IncumbentAlive {
_tag: 'IncumbentAlive';
nodeKey: string;
incumbent: DirectoryEntry;
name: string;
message: string;
stack: string;
cause: unknown;
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;
}
Advertise rejected — an incumbent with the same nodeKey still answers NodeStatus ping.
IncumbentAlive extends import SchemaSchema.const TaggedErrorClass: <IncumbentAlive, {}>(identifier?: string) => {
<Tag, Fields>(tag: Tag, fields: Fields, annotations?: Schema.Annotations.Declaration<IncumbentAlive, readonly [Schema.TaggedStruct<Tag, Fields>]> | undefined): Schema.Class<IncumbentAlive, Schema.TaggedStruct<Tag, Fields>, YieldableError>;
<Tag, S>(tag: Tag, schema: S, annotations?: Schema.Annotations.Declaration<IncumbentAlive, 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 yieldable error class with an automatically populated
_tag field.
When to use
Use to define typed errors that are schema validated, yielded in Effect.gen,
and matched as tagged union members.
Example (Defining a tagged error class)
import { Effect, Schema } from "effect"
class NotFound extends Schema.TaggedErrorClass<NotFound>()("NotFound", {
id: Schema.Number
}) {}
const program = Effect.gen(function*() {
yield* new NotFound({ id: 42 })
})
TaggedErrorClass<class IncumbentAliveclass IncumbentAlive {
_tag: 'IncumbentAlive';
nodeKey: string;
incumbent: DirectoryEntry;
name: string;
message: string;
stack: string;
cause: unknown;
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;
}
Advertise rejected — an incumbent with the same nodeKey still answers NodeStatus ping.
IncumbentAlive>()(
"IncumbentAlive",
{
nodeKey: Schema.String(property) nodeKey: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, 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; <…;
}
nodeKey: import SchemaSchema.const String: Schema.Stringconst String: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, 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
String
.
Schema for string values. Validates that the input is typeof "string".
String,
incumbent: typeof DirectoryEntry(property) incumbent: {
Type: Self;
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
identifier: string;
fields: S["fields"];
mapFields: (f: (fields: { readonly nodeKey: Schema.String; readonly kind: Schema.Literals<readonly ['Http', 'WebSocket', 'IpcSocket']>; readonly url: Schema.optionalKey<Schema.String>; readonly path: Schema.optionalKey<Schema.String>; readonly serves…;
extend: (identifier: string) => { (fields: NewFields, annotations?: Schema.Annotations.Declaration<Extended, readonly [Schema.Struct<{ [K in keyof { [K in keyof (('kind' | 'url' | 'path' | 'serves' | 'nodeKey') & keyof NewFields extends never ? { …;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<DirectoryEntry, readonly [Schema.Struct<{ readonly nodeKey: Schema.String; readonly kind: Schema.Literals<readonly ['Http', 'WebSocket', 'IpcSocket']>; readonly url: Schema.optionalKey<Schema.String>…;
annotateKey: (annotations: Schema.Annotations.Key<DirectoryEntry>) => Schema.decodeTo<Schema.declareConstructor<DirectoryEntry, { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; reado…;
check: (checks_0: Check<DirectoryEntry>, ...checks: Array<Check<DirectoryEntry>>) => Schema.decodeTo<Schema.declareConstructor<DirectoryEntry, { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly n…;
rebuild: (ast: Declaration) => Schema.decodeTo<Schema.declareConstructor<DirectoryEntry, { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; reado…;
make: (input: { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; readonly path?: string | undefined }, options?: Schema.MakeOptions) => Direct…;
makeOption: (input: { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; readonly path?: string | undefined }, options?: Schema.MakeOptions) => Option…;
makeEffect: (input: { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; readonly path?: string | undefined }, options?: Schema.MakeOptions) => 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; <…;
}
incumbent: class DirectoryEntryclass DirectoryEntry {
Type: Self;
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
identifier: string;
fields: S["fields"];
mapFields: (f: (fields: { readonly nodeKey: Schema.String; readonly kind: Schema.Literals<readonly ['Http', 'WebSocket', 'IpcSocket']>; readonly url: Schema.optionalKey<Schema.String>; readonly path: Schema.optionalKey<Schema.String>; readonly serves…;
extend: (identifier: string) => { (fields: NewFields, annotations?: Schema.Annotations.Declaration<Extended, readonly [Schema.Struct<{ [K in keyof { [K in keyof (('kind' | 'url' | 'path' | 'serves' | 'nodeKey') & keyof NewFields extends never ? { …;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<DirectoryEntry, readonly [Schema.Struct<{ readonly nodeKey: Schema.String; readonly kind: Schema.Literals<readonly ['Http', 'WebSocket', 'IpcSocket']>; readonly url: Schema.optionalKey<Schema.String>…;
annotateKey: (annotations: Schema.Annotations.Key<DirectoryEntry>) => Schema.decodeTo<Schema.declareConstructor<DirectoryEntry, { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; reado…;
check: (checks_0: Check<DirectoryEntry>, ...checks: Array<Check<DirectoryEntry>>) => Schema.decodeTo<Schema.declareConstructor<DirectoryEntry, { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly n…;
rebuild: (ast: Declaration) => Schema.decodeTo<Schema.declareConstructor<DirectoryEntry, { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; reado…;
make: (input: { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; readonly path?: string | undefined }, options?: Schema.MakeOptions) => Direct…;
makeOption: (input: { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; readonly path?: string | undefined }, options?: Schema.MakeOptions) => Option…;
makeEffect: (input: { readonly kind: 'Http' | 'WebSocket' | 'IpcSocket'; readonly serves: ReadonlyArray<string>; readonly nodeKey: string; readonly url?: string | undefined; readonly path?: string | undefined }, options?: Schema.MakeOptions) => 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; <…;
}
Directory row — dial target plus resource keys this node serves (listen catalog).
DirectoryEntry,
},
) {}
Referenced by 1 symbols