Results

Namespace

Type

Index

Type aliases

Json

Json: string | number | boolean | null | JsonObject | JsonArray

Variables

Const kv

Functions

requestCpuBurst

  • requestCpuBurst<T>(callback: function, requestMs?: undefined | number): Promise<ICpuBurstResult<T>>
  • Requests a CPU burst execution context. The "callback" function argument will be ran with it's own CPU timeout.

    CPU burst contexts may run to completion and return a result, which is passed to the parent execution context. Furthermore, the context runs in-scope, so you can share any local variables between the main context and burst contexts.

    The second argument is an optional amount of maximum CPU milliseconds to consume for this burst request. By default, the limit is 1000ms. You may choose between 200ms and 3000ms.

    Any unused time greater than 200ms will be returned to your burst quota bucket for re-use in future burst requests. Your CPU burst quota bucket resets every 10 minutes. Information on your quota bucket is available in the return value See pylon.ICpuBurstResult for more info.

    If an error occurs (such as the quota limit exceeded) this function will throw an exception. See pylon.CpuBurstRequestError and pylon.CpuBurstTimeoutError for more information.

    Type parameters

    • T

    Parameters

    • callback: function

      The method to use as the entry-point for the child execution context.

        • () => Promise<T> | T
        • Returns Promise<T> | T

    • Optional requestMs: undefined | number

      The amount of time in milliseconds to burst. Default: 1000ms

    Returns Promise<ICpuBurstResult<T>>

    A promise that resolves with a pylon.ICpuBurstResult value of the callback, if the burst request and callback succeeded.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc