UNPKG

harperdb

Version:

HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.

33 lines (32 loc) 1.22 kB
import { IterableEventQueue } from './IterableEventQueue'; /** * This module/function is responsible for the main work of tracking subscriptions and listening for new transactions * that have occurred on any thread, and then reading through the transaction log to notify listeners. This is * responsible for cleanup of subscriptions as well. * @param path * @param dbi * @param key * @param listener */ export declare function addSubscription(table: any, key: any, listener?: (key: any) => any, start_time: number, options: any): Subscription; /** * This is the class that is returned from subscribe calls and provide the interface to set a callback, end the * subscription and get the initial state. */ declare class Subscription extends IterableEventQueue { listener: (key: any) => any; subscriptions: []; startTime?: number; constructor(listener: any); end(): void; toJSON(): { name: string; }; } /** * Interface with lmdb-js to listen for commits and traverse the audit log. * @param primary_store */ export declare function listenToCommits(primary_store: any, audit_store: any): void; export declare function whenNextTransaction(audit_store: any): any; export {};