Refactor out Cluster.apiUrl to direct reading

- Should help prevent using stale data

- Removes some uses of synchronous FS operations

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-03-31 14:41:56 -04:00
1 parent 18d660ea77
commit cd5ddd93c3
52 files changed
+437 -615

No files matched your search

@@ -85,6 +85,15 @@ export async function getOrInsertWithAsync<K, V>(map: Map<K, V>, key: K, asyncBu
return map.get(key)!;
}
/**
* Insert `val` into `map` under `key` and then get the value back
*/
export function setAndInsert<K, V>(map: Map<K, V>, key: K, val: V): V {
map.set(key, val);
return map.get(key)!;
}
/**
* Set the value associated with `key` iff there was not a previous value
* @param map The map to interact with