Hyperlinkv0.8.0-beta.28

Lookup

Lookup.preferEntryconstsrc/Lookup.ts:411
(resourceKey: string, entry: { readonly nodeKey: string }): Effect.Effect<
  string,
  never,
  Advice
>

Prefer a directory row's nodeKey for resourceKey.

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