mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-13 18:32:12 +03:00
* fix(dev): reduce instrumentation executor fan-out * fix(ci): reduce credential refresh complexity --------- Co-authored-by: backryun <backryun@daonlab.local>
14 lines
480 B
TypeScript
14 lines
480 B
TypeScript
import { DefaultExecutor } from "./default.ts";
|
|
|
|
const defaultExecutorCache = new Map<string, DefaultExecutor>();
|
|
|
|
/** Resolve the shared fallback executor without initializing the specialized executor registry. */
|
|
export function getDefaultExecutor(provider: string): DefaultExecutor {
|
|
let executor = defaultExecutorCache.get(provider);
|
|
if (!executor) {
|
|
executor = new DefaultExecutor(provider);
|
|
defaultExecutorCache.set(provider, executor);
|
|
}
|
|
return executor;
|
|
}
|