zibri
    Preparing search index...

    Interface for a data source service.

    interface DataSourceServiceInterface {
        afterAppShutdown: (
            app: ZibriApplication,
            signal: "SIGHUP" | "SIGINT" | "SIGTERM" | undefined,
        ) => void | Promise<void>;
        beforeAppInit: (app: ZibriApplication) => void | Promise<void>;
        shutdownTimeoutInMs?: number;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    afterAppShutdown: (
        app: ZibriApplication,
        signal: "SIGHUP" | "SIGINT" | "SIGTERM" | undefined,
    ) => void | Promise<void>

    Runs just after the app shuts down. This is useful for things like the data source service, which should still be available at the OnAppShutdown hooks.

    In most cases you probably want to implement OnAppShutdown.

    beforeAppInit: (app: ZibriApplication) => void | Promise<void>

    Runs just before the app initializes. This is useful for things like the data source service, which other services might rely on being available on initialization.

    In most cases you probably want to implement OnAppInit, as your service probably does not fall in that category.

    shutdownTimeoutInMs?: number

    The timeout for after which the graceful shutdown should fail.

    30 seconds