package
1.1.0
Repository: https://github.com/compose/transporter.git
Documentation: pkg.go.dev

# README

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
    }
}