Options
All
  • Public
  • Public/Protected
  • All
Menu

An UUID metric.

Stores UUID v4 (randomly generated) values.

Hierarchy

  • default

Index

Constructors

Properties

Methods

  • generateAndSet(): undefined | string
  • Generates a new random uuid and sets the metric to it.

    Returns undefined | string

    The generated value or undefined in case this metric shouldn't be recorded.

  • set(value: string): void
  • Sets to the specified value.

    throws

    In case value is not a valid UUID.

    Parameters

    • value: string

      the value to set.

    Returns void

  • testGetNumRecordedErrors(errorType: string, ping?: string): Promise<number>
  • Test-only API

    Returns the number of errors recorded for the given metric.

    Parameters

    • errorType: string

      The type of the error recorded.

    • ping: string = ...

      represents the name of the ping to retrieve the metric for. Defaults to the first value in sendInPings.

    Returns Promise<number>

    the number of errors recorded for the metric.

  • testGetValue(ping?: string): Promise<undefined | string>
  • Test-only API.**

    Gets the currently stored value as a string.

    This doesn't clear the stored value.

    Parameters

    • ping: string = ...

      the ping from which we want to retrieve this metrics value from. Defaults to the first value in sendInPings.

    Returns Promise<undefined | string>

    The value found in storage or undefined if nothing was found.

Generated using TypeDoc