Hyperlinkv0.9.0-beta.0

Lookup

Lookup.preferEntryconstsrc/Lookup.ts:434
(
  service: string | { readonly key: string },
  entry: { readonly nodeKey: string }
): Effect.Effect<string, never, Advice>

Prefer a directory row's nodeKey for a HyperService.

const rows = yield* Lookup.nodesServing(Worker)
yield* Lookup.preferEntry(Worker, rows[0]!)
constructors
Source src/Lookup.ts:4345 lines
export const preferEntry = (
  service: string | { readonly key: string },
  entry: { readonly nodeKey: string },
): Effect.Effect<string, never, Advice> =>
  advise({ serviceKey: serviceKeyOf(service), prefer: entry.nodeKey });