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.
opfilter({"whitelist": ["insert"]})
opfilter({"blacklist": ["delete"]})
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
}
}