A FDv2 PayloadReader can be used to parse payloads from a stream of FDv2 events. It will send payloads to the PayloadListeners as the payloads are received. Invalid series of events may be dropped silently, but the payload reader will continue to operate.

Hierarchy

  • PayloadReader

Constructors

  • Creates a PayloadReader

    Parameters

    • eventStream: EventStream

      event stream of FDv2 events

    • _objProcessors: ObjProcessors

      defines object processors for each object kind.

    • Optional _errorHandler: ((errorKind, message) => void)

      that will be called with errors as they are encountered

      Optional
        • (errorKind, message): void
        • Parameters

          Returns void

    • Optional _logger: LDLogger

      for logging

      Optional

    Returns PayloadReader

Properties

_errorHandler?: ((errorKind, message) => void)

Type declaration

    • (errorKind, message): void
    • that will be called with errors as they are encountered

      Parameters

      Returns void

_listeners: PayloadListener[] = []
_logger?: LDLogger

for logging

_objProcessors: ObjProcessors

defines object processors for each object kind.

_tempBasis?: boolean = undefined
_tempId?: string = undefined
_tempUpdates: Update[] = []

Methods

Generated using TypeDoc