opfilter

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL