Hyperlinkv0.8.0-beta.28

Hyperlink

Hyperlink.peersconstsrc/Hyperlink.ts:5315
<Self, S extends Spec>(tag: HyperlinkTag<Self, S>): Effect.Effect<
  Record<string, PeerServiceOf<S>>,
  never,
  PeersId<Self>
>

The resource's peer clients — the OTHER nodes' full services, keyed by node — for a resource's own cross-node logic. Requires the peersLayer capability. Fold them with /MultiNode's combineQuery/combineStream (or iterate) and add your own value:

totalConnections: combineQuery(peers, (p) => p.connections, combineSum).pipe(
  Effect.map((others) => pool.activeCount() + others), // self + peers — you write self in
)

Fold over per-instance ("leaf") fields (p.connections), not a peer's own fleet field (p.totalConnections) — a peer client is the full service, so a fleet field is callable but would make it re-gather its peers (a cross-node fan-out, not what you want in a fold). The plain-query model has no type-level leaf/fleet distinction, so this is a convention, not a compile error.

nodes & fleetpeersLayer
Source src/Hyperlink.ts:53153 lines
export const peers = <Self, S extends Spec>(
  tag: HyperlinkTag<Self, S>,
): Effect.Effect<Record<string, PeerServiceOf<S>>, never, PeersId<Self>> => tag[peersSym];
Referenced by 1 symbols