FynMesh API
    Preparing search index...

    Interface KernelHooks

    What the kernel hands an add-on at install time. Add-ons reach the kernel only through this and the public kernel API, never through its internals: each bundle mangles property names on its own, so a name only survives the trip between bundles when it is declared here.

    The array members are hook lists. Add-ons push handlers; the kernel calls them in install order.

    interface KernelHooks {
        appGone: ((fynApp: FynApp) => void)[];
        basicsLoaded: ((fynApp: FynApp) => Promise<void>)[];
        beforeMain: ((fynApp: FynApp) => Promise<void>)[];
        exposeLoaded: (
            (fynApp: FynApp, exposeName: string, exposedModule: any) => void
        )[];
        init: ((data: FynMeshRuntimeData) => void)[];
        runtime: ((fynApp: FynApp, runtime: FynUnitRuntime) => void)[];
        runUnit: ((fynApp: FynApp, fynUnit: FynUnit) => Promise<boolean>)[];
        tel: KernelTelemetry;
        findApp(name: string): FynApp | undefined;
        loadExpose(
            fynApp: FynApp,
            exposeName: string,
        ): Promise<
            Result<
                any,
                (Anonymous class)<
                    { exposeName?: string; fynAppName?: string; fynAppVersion?: string },
                >,
            >,
        >;
        providerMode(
            fynAppName: string,
            name: string,
            mode: "provider" | "consumer",
        ): void;
        rt(): FynMeshRuntimeData;
        runtimeFor(fynApp: FynApp): FynUnitRuntime;
        setTel(sink: KernelTelemetry): void;
    }
    Index
    appGone: ((fynApp: FynApp) => void)[]

    A FynApp shut down or failed bootstrap. Drop what is held for it.

    basicsLoaded: ((fynApp: FynApp) => Promise<void>)[]

    A FynApp's config, setup and main are loaded; it is not yet in the registry.

    beforeMain: ((fynApp: FynApp) => Promise<void>)[]

    Bootstrap holds the lock and is about to run the main FynUnit.

    exposeLoaded: ((fynApp: FynApp, exposeName: string, exposedModule: any) => void)[]

    An expose module was loaded and recorded on the FynApp.

    init: ((data: FynMeshRuntimeData) => void)[]

    initRunTime was called with new runtime data.

    runtime: ((fynApp: FynApp, runtime: FynUnitRuntime) => void)[]

    A FynUnit runtime was created. Add fields to it.

    runUnit: ((fynApp: FynApp, fynUnit: FynUnit) => Promise<boolean>)[]

    Run the main FynUnit. Return true when the handler ran it. The kernel runs the unit itself (initialize, then execute) when no handler does.

    Root kernel telemetry. Scope it per add-on.

    • Look up a loaded FynApp by "name" or "name@version".

      Parameters

      • name: string

      Returns FynApp | undefined

    • Load an expose of a FynApp, record it, and run the exposeLoaded hooks.

      Parameters

      • fynApp: FynApp
      • exposeName: string

      Returns Promise<
          Result<
              any,
              (Anonymous class)<
                  { exposeName?: string; fynAppName?: string; fynAppVersion?: string },
              >,
          >,
      >

    • Record that a FynApp provides or consumes something, for bootstrap ordering.

      Parameters

      • fynAppName: string
      • name: string
      • mode: "provider" | "consumer"

      Returns void

    • Swap where telemetry goes. Scopes taken earlier follow the swap.

      Parameters

      Returns void