This represents a segment slice which can be used to read events from a Pravega segment as an iterator.

Individual events can be read from the Slice using the following snippets.

const seg_slice: Slice = await stream_reader.get_segment_slice();
for (const event of seg_slice) {
const raw_value: ArrayBuffer = event.data();
// do your things
}

Hierarchy

  • IterableIterator<Event>
    • Slice

Properties

internal_slice: any

The internal rust object used to release segment. Should not be used in user code!

Methods

  • Returns IterableIterator<Event>

  • Parameters

    • Rest ...args: [] | [undefined]

    Returns IteratorResult<Event, any>

  • Parameters

    • Optional value: any

    Returns IteratorResult<Event, any>

  • Parameters

    • Optional e: any

    Returns IteratorResult<Event, any>

Generated using TypeDoc