Options
All
  • Public
  • Public/Protected
  • All
Menu

Stores information about a ping.

This is required so that given metric data queued on disk we can send pings with the correct settings, e.g. whether it has a client_id.

Hierarchy

  • default

Index

Constructors

Properties

Methods

Constructors

Properties

Methods

  • submit(reason?: string): void
  • Collects and submits a ping for eventual uploading.

    The ping content is assembled as soon as possible, but upload is not guaranteed to happen immediately, as that depends on the upload policies.

    If the ping currently contains no content, it will not be sent, unless it is configured to be sent if empty.

    Parameters

    • Optional reason: string

      The reason the ping was triggered. Included in the ping_info.reason part of the payload.

    Returns void

  • testBeforeNextSubmit(callbackFn: ValidatorFunction): Promise<void>
  • Test-only API

    Runs a validation function before the ping is collected.

    Parameters

    • callbackFn: ValidatorFunction

      The asynchronous validation function to run in order to validate the ping content.

    Returns Promise<void>

    A Promise resolved when the ping is collected and the validation function is executed.

Generated using TypeDoc