<Self>(): {
(): FleetHealthTag<Self>
<HSelf>(options: {
readonly node: NodeKey<HSelf>
readonly description?: string
}): FleetHealthNodeTag<Self, HSelf>
}Declare a FleetHealth tag:
class MeshHealth extends FleetHealth.Tag<MeshHealth>()().pipe(
Hyperlink.nodes([DropletEast, DropletWest]),
) {}constructors
Source src/FleetHealth.ts:17124 lines
export const const Tag: <Self>() => {
(): FleetHealthTag<Self>
<HSelf>(options: {
readonly node: NodeKey<HSelf>
readonly description?: string
}): FleetHealthNodeTag<Self, HSelf>
}
Declare a FleetHealth tag:
class MeshHealth extends FleetHealth.Tag<MeshHealth>()().pipe(
Hyperlink.nodes([DropletEast, DropletWest]),
) {}
Tag = <function (type parameter) Self in <Self>(): {
(): FleetHealthTag<Self>;
<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>;
}
Self>() => {
function function (local function) build(): FleetHealthTag<Self> (+1 overload)build(): type FleetHealthTag<Self> = Hyperlink.HyperlinkTag<Self, {
local: Hyperlink.Method<undefined, typeof LocalHealth, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>;
byNode: Hyperlink.Marked<Hyperlink.Method<undefined, Schema.$Record<Schema.String, Schema.Union<readonly [typeof Reachable, typeof Unreachable]>>, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>, {
readonly fleet: true;
}>;
status: Hyperlink.Marked<...>;
}, {
...;
}>
A FleetHealth instance tag.
FleetHealthTag<function (type parameter) Self in <Self>(): {
(): FleetHealthTag<Self>;
<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>;
}
Self>;
function function (local function) build<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf> (+1 overload)
build<function (type parameter) HSelf in build<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>
HSelf>(options: {
readonly node: NodeKey<HSelf>
readonly description?: string
}
options: {
readonly node: NodeKey<HSelf>(property) node: {
key: string;
Service: {
protocol: Context.Service.Shape<typeof RpcClient.Protocol>;
ping: Effect.Effect<number, NodeUnreachable>;
status: { readonly get: Effect.Effect<NodeStatusSnapshot, NodeUnreachable>; readonly changes: Stream.Stream<NodeStatusSnapshot, NodeUnreachable> };
logs: { readonly stream: Stream.Stream<LogEntry, NodeUnreachable>; readonly query: (options: { readonly limit: number }) => Effect.Effect<ReadonlyArray<LogEntry>, NodeUnreachable> };
};
Identifier: Identifier;
stack: string | undefined;
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;
}
node: type NodeKey<HSelf> = Key<HSelf, NodeProtocol>The Context key of a
Node
(HSelf = its identity): a service whose value is the
transport
NodeProtocol
. Stored on a node-bearing tag under
nodeSym
; read by
Hyperlink.client
to resolve where to connect (its requirement channel).
NodeKey<function (type parameter) HSelf in build<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>
HSelf>;
readonly description?: string | undefineddescription?: string;
}): type FleetHealthNodeTag<Self, HSelf> = Hyperlink.NodeBoundTag<Self, {
local: Hyperlink.Method<undefined, typeof LocalHealth, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>;
byNode: Hyperlink.Marked<Hyperlink.Method<undefined, Schema.$Record<Schema.String, Schema.Union<readonly [typeof Reachable, typeof Unreachable]>>, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>, {
readonly fleet: true;
}>;
status: Hyperlink.Marked<...>;
}, HSelf, {
...;
}>
A node-bound
FleetHealthTag
.
FleetHealthNodeTag<function (type parameter) Self in <Self>(): {
(): FleetHealthTag<Self>;
<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>;
}
Self, function (type parameter) HSelf in build<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>
HSelf>;
function function (local function) build(): FleetHealthTag<Self> (+1 overload)build(
options: FleetHealthConstructOptions<unknown>options?: interface FleetHealthConstructOptions<HSelf = never>Tag-construction options for
Tag
.
FleetHealthConstructOptions<unknown>,
): type FleetHealthTag<Self> = Hyperlink.HyperlinkTag<Self, {
local: Hyperlink.Method<undefined, typeof LocalHealth, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>;
byNode: Hyperlink.Marked<Hyperlink.Method<undefined, Schema.$Record<Schema.String, Schema.Union<readonly [typeof Reachable, typeof Unreachable]>>, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>, {
readonly fleet: true;
}>;
status: Hyperlink.Marked<...>;
}, {
...;
}>
A FleetHealth instance tag.
FleetHealthTag<function (type parameter) Self in <Self>(): {
(): FleetHealthTag<Self>;
<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>;
}
Self> {
const const node: NodeKey<unknown> | undefinednode = options: FleetHealthConstructOptions<unknown>options?.FleetHealthConstructOptions<unknown>.node?: NodeKey<HSelf>node;
const const key: stringkey = const keyFor: (
node: NodeKey<unknown> | undefined
) => string
keyFor(const node: NodeKey<unknown> | undefinednode);
return const node: NodeKey<unknown> | undefinednode === var undefinedundefined
? hyperlinkTag<Self>(): SchemaTagBuilder<Self> (+2 overloads)Schema-driven solo: infer the service from spec; bare
local
is a compile error.
hyperlinkTag<function (type parameter) Self in <Self>(): {
(): FleetHealthTag<Self>;
<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>;
}
Self>()(const key: stringkey, const fleetHealthSpec: {
local: Hyperlink.Method<undefined, typeof LocalHealth, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>;
byNode: Hyperlink.Marked<Hyperlink.Method<undefined, Schema.$Record<Schema.String, Schema.Union<readonly [typeof Reachable, typeof Unreachable]>>, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>, {
readonly fleet: true;
}>;
status: Hyperlink.Marked<...>;
}
fleetHealthSpec, {
kind?: string | undefinedkind,
description?: string | undefineddescription: options: FleetHealthConstructOptions<unknown>options?.FleetHealthConstructOptions<unknown>.description?: string | undefineddescription,
})
: hyperlinkTag<Self>(): SchemaTagBuilder<Self> (+2 overloads)Schema-driven solo: infer the service from spec; bare
local
is a compile error.
hyperlinkTag<function (type parameter) Self in <Self>(): {
(): FleetHealthTag<Self>;
<HSelf>(options: {
readonly node: NodeKey<HSelf>;
readonly description?: string;
}): FleetHealthNodeTag<Self, HSelf>;
}
Self>()(const key: stringkey, const fleetHealthSpec: {
local: Hyperlink.Method<undefined, typeof LocalHealth, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>;
byNode: Hyperlink.Marked<Hyperlink.Method<undefined, Schema.$Record<Schema.String, Schema.Union<readonly [typeof Reachable, typeof Unreachable]>>, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>, {
readonly fleet: true;
}>;
status: Hyperlink.Marked<...>;
}
fleetHealthSpec, {
kind?: string | undefinedkind,
description?: string | undefineddescription: options: FleetHealthConstructOptions<unknown>options?.FleetHealthConstructOptions<unknown>.description?: string | undefineddescription,
node: NodeKey<unknown>(property) node: {
key: string;
Service: {
protocol: Context.Service.Shape<typeof RpcClient.Protocol>;
ping: Effect.Effect<number, NodeUnreachable>;
status: { readonly get: Effect.Effect<NodeStatusSnapshot, NodeUnreachable>; readonly changes: Stream.Stream<NodeStatusSnapshot, NodeUnreachable> };
logs: { readonly stream: Stream.Stream<LogEntry, NodeUnreachable>; readonly query: (options: { readonly limit: number }) => Effect.Effect<ReadonlyArray<LogEntry>, NodeUnreachable> };
};
Identifier: Identifier;
stack: string | undefined;
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;
}
node,
});
}
return function (local function) build(): FleetHealthTag<Self> (+1 overload)build;
};