@sha1n/fungus
Version:
A dependency based service graph controller library
15 lines (14 loc) • 591 B
TypeScript
import { ServiceSpec, Environment, RuntimeContext, ServiceId, ServiceMetadata } from './types';
declare class InternalRuntimeContext implements RuntimeContext {
readonly name: string;
private readonly _catalog;
shuttingDown: boolean;
constructor(name: string);
get catalog(): ReadonlyMap<ServiceId, ServiceMetadata>;
register(metadata: ServiceMetadata): void;
unregister(id: ServiceId): void;
}
declare function createEnvironment(specs: readonly ServiceSpec[], options?: {
name?: string;
}): Environment;
export { InternalRuntimeContext, createEnvironment };