Type Alias SuspendOptions

SuspendOptions: {
    callback?: () => Promise<boolean>;
    interval?: number;
    mode?: SuspendMode;
}

Type declaration

  • Optionalcallback?: () => Promise<boolean>

    A callback that is invoked before actually suspending the server. If false is returned the client will not continue suspending the server.

  • Optionalinterval?: number

    The interval in milliseconds used to check if the server can be suspended. If the check passes three times in a row (e.g. the server can be suspended for 3 * interval ms) the server is suspended. Defaults to 60000ms, which is also the minimum allowed value.

  • Optionalmode?: SuspendMode

    Whether suspend mode is supported. If suspend mode is allowed the client will stop a running server when going into suspend mode. If omitted defaults to SuspendMode.off;