Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Latest commit

 

History

History

opfilter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

opfilter function

opfilter() will skip messages based on the provided Whitelist or Blacklist ops. The string representation of each operation can be found in the message/ops pkg.

configuration

opfilter({"whitelist": ["insert"]})
opfilter({"blacklist": ["delete"]})

example

messages in

{
    "op": "insert",
    {
        "_id": 0,
        "name": "transporter",
        "type": "function",
        "count": 10
    }
}
{
    "op": "delete",
    {
        "_id": 0,
        "name": "transporter",
        "type": "function",
        "count": 10
    }
}

config

opfilter({"whitelist": ["insert"]})

messages out

{
    "op": "insert",
    {
        "_id": 0,
        "name": "transporter",
        "type": "function",
        "count": 10
    }
}