UNPKG

@fluent-org/logger

Version:
33 lines (32 loc) 1.07 kB
import { Queue, PacketData } from "./queue"; import * as protocol from "../protocol"; import { DeferredPromise } from "../util"; declare type EventRecord = { tag: protocol.Tag; time: protocol.Time; event: protocol.EventRecord; deferred: DeferredPromise<void>; }; /** * Implements the Forward specification's [Message mode](https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1#message-modes) */ export declare class MessageQueue extends Queue { /** * Maintain the queue as a Set * * JS guarantees sets are insertion ordered, so calling sendQueue.values().next.value will be the first entry to be inserted. */ private sendQueue; /** * Size is not measured for this queue */ get queueSize(): number; /** * The length of the queue */ get queueLength(): number; push(tag: protocol.Tag, time: protocol.Time, event: protocol.EventRecord): Promise<void>; protected pop(): EventRecord | null; nextPacket(chunk?: protocol.Chunk): PacketData | null; } export {};