kinetex - v1.0.0-rc.1
    Preparing search index...

    Class BatchingTransport

    BatchingTransport buffers log entries and flushes them in batches.

    Note: If flush() is called while a timer is pending, there is a potential race:

    • The timer callback could fire while flush() is executing
    • The timer is cleared at the start of flush() to mitigate this
    • However, if the timer fires simultaneously with flush(), entries may be written twice or the timer callback could operate on an empty buffer

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Parameters

      • inner: LogTransport

        The underlying transport to flush entries to

      • options: { maxBatch?: number; flushMs?: number } = {}

        Batching configuration (maxBatch, flushMs)

        • OptionalmaxBatch?: number

          Maximum entries per batch. Default: 100

        • OptionalflushMs?: number

          Flush interval in ms. Default: 5000

      Returns BatchingTransport

    Methods