kafka-sagas
Version:
Build sagas that consume from a kafka topic
9 lines (8 loc) • 367 B
TypeScript
import { IAction, IActionBuffer, PromiseResolver } from '../types';
export default class ActionChannelBuffer<Action extends IAction> implements IActionBuffer<Action> {
protected actions: Action[];
protected observers: Array<PromiseResolver<Action>>;
put(action: Action): void;
take(): Promise<Action>;
protected notifyObservers(): void;
}