StreamedCollection

StreamedCollection

Class encapsulating a capped collection watching a particular cache modifications.

Constructor

new StreamedCollection(db, name, handler)

Source:

Constructor

Parameters:
Name Type Description
db Mongo

db object

name String

collection name

handler function

a function handling IPC requests

Methods

put(o, g, k, d) → {Promise}

Source:

Add a record to the collection

Parameters:
Name Type Description
o int

operation type (see OP above)

g String

group name

k String

key - document key

d Object

data

Returns:

resolves to the inserted change document

Type
Promise

(async) start()

Source:

Start change stream

stop()

Source:

Close change stream