JS API Reference

Class: EventReader

shared/yagna/event-reader.EventReader

Table of contents

Constructors

Methods

Constructors

constructor

new EventReader(logger): EventReader

Parameters

NameType
loggerLogger

Returns

EventReader

Defined in

src/shared/yagna/event-reader.ts:28

Methods

pollToSubject

pollToSubject<T>(generator, subject): Promise<void>

Type parameters

Name
T

Parameters

NameType
generatorAsyncGenerator<T, any, unknown>
subjectSubject<T>

Returns

Promise<void>

Defined in

src/shared/yagna/event-reader.ts:30


createReader

createReader<T>(eventType, eventsFetcher): CancellablePoll<T>

Type parameters

NameType
Textends Event

Parameters

NameType
eventTypestring
eventsFetcherCancellableEventsFetcherWithCursor<T>

Returns

CancellablePoll<T>

Defined in

src/shared/yagna/event-reader.ts:38