A generic pubsub class, implemented with repeaters
npm install @repeaterjs/pubsubA generic pubsub class, implemented with repeaters
For more information, visit repeater.js.org.
``ts
interface PubSub
publish(topic: string, value: T): Promise
unpublish(topic: string, reason?: any): Promise
subscribe(topic: string, buffer?: RepeaterBuffer
close(reason?: any): Promise
}
class InMemoryPubSub
publish(topic: string, value: T): void;
unpublish(topic: string, reason?: any): void;
subscribe(topic: string, buffer?: RepeaterBuffer
close(reason?: any): void;
}
``