Class responsible of managing jsonl file store operations

Hierarchy

  • EventEmitter
    • ArchiverManager

Constructors

Accessors

Methods

Events

Constructors

Accessors

  • get stats(): Record<string, FileStats>
  • Returns the statistics of the files

    Returns Record<string, FileStats>

Methods

  • Appends data to a JSONL file.

    Parameters

    • data: Record<string, any> | Record<string, any>[]

      Data to append

    Returns Promise<AppendResult>

  • Appends data to a JSONL file.

    Parameters

    • data: Record<string, any> | Record<string, any>[]

      Data to append

    • Optionalfilename: string

      Name of the file to append data to

    Returns Promise<AppendResult>

  • Returns the error status of the file handlers

    Returns boolean

  • Starts the ArchiverManager

    Returns Promise<void>

  • Stops the jsonl file store manager

    Returns Promise<void>

Events

  • Add a listener for the error event, emitted when there is an error in a file handler operation.

    Parameters

    • event: "error"

      error event

    • listener: (error: Crash) => void

      Error event listener

    Returns this

  • Add a listener for the rotate event, emitted when a file is rotated.

    Parameters

    • event: "rotate"

      error event

    • listener: (stats: FileStats) => void

      Error event listener

    Returns this

  • Add a listener for the resolve event, emitted when an operation is resolved.

    Parameters

    • event: "resolve"

      resolve event

    • listener: (stats: FileStats) => void

      Resolve event listener

    Returns this

  • Adds a listener for the handlerCleaned event, emitted when a handler is cleaned up due to inactivity.

    Parameters

    • event: "handlerCleaned"

      handlerCleaned event

    • listener: (handlerName: string) => void

      Handler cleaned event listener

    Returns this