Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RawQueueMap

Raw version of the IQueueMap interface where values are returned directly as Buffers.

Hierarchy

  • RawQueueMap

Implements

Index

Constructors

  • Construct a new instance operating on the given map.

    The map must be of QUEUE or STACK type.

    Parameters

    • ref: MapRef

      Reference to the map. See MapRef if you want to implement your own instances.

    Returns RawQueueMap

Properties

ref: MapRef

Methods

  • [iterator](): IterableIterator<Buffer>
  • consumeValues(limit?: number): IterableIterator<Buffer>
  • Convenience function. Consumes values repeatedly until the queue is empty.

    In cases where another program is pushing things to the queue concurrently, it is recommended to place a limit to avoid loop starvation.

    Parameters

    • Optional limit: number

    Returns IterableIterator<Buffer>

  • empty(): boolean
  • freeze(): void
  • Freezes the map, making it non-modifiable from userspace. The map stays writeable from BPF side.

    Since Linux 5.2.

    Returns void

  • peek(flags?: number, out?: Buffer): undefined | Buffer
  • Get the next value without removing it from the queue.

    Parameters

    • flags: number = 0
    • Optional out: Buffer

    Returns undefined | Buffer

    Entry value, or undefined if the queue is empty

  • pop(out?: Buffer): undefined | Buffer
  • Consume the next value from the queue.

    Parameters

    • Optional out: Buffer

    Returns undefined | Buffer

    Entry value, or undefined if the queue is empty

Generated using TypeDoc