• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Halibot / halibot / 437
93%
master: 93%

Build:
Build:
LAST BUILD BRANCH: config-writer
DEFAULT BRANCH: master
Ran 08 Mar 2019 09:53PM UTC
Jobs 2
Files 20
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
437

Pull #132

travis-ci

web-flow
halibot: implement filters as new halibot object type

Problem: How can we introduce rate limiting, self-censoring, or other kind of
logic into Halibot instances without adding this to each module or agent?

This patch introduces a new Halibot object type "HalFilter". These filters can
be inserted in between a normal message send path, to silently drop or modify
message content. These filters are NOT meant for large behaviors.

Filters are instantiated similarly to other HalObjects, using the
"filter-instances" config key. To "attach" a filter to an agent or module, a
new filter table needs to be defined in config.json.

Here is an example:

"filters": {
    "inbound": {
      "irc0": [ "rlfilter0" ]
    },

    "outbound": {
      "quote0": [ "rlfilter1" ]
    }
}

In this example, "rlfilter0" and "rlfilter1" are instances of a rate-limiting
filter. The above declaration states that all messages from any source being
sent to irc0 must first pass through rlfilter0. Also, any messages flowing out
from module quote0 must first pass through rlfilter1.

As rlfilter0 and rlfilter1 are different instances, they may have different
tolerances for their rate limiter. So, for example, this could restrict the
amount of spam coming from one particular module more strictly than all
messages flowing to an agent.
Pull Request #132: Implement HalFilters via RI injection

173 of 173 new or added lines in 6 files covered. (100.0%)

1137 of 1218 relevant lines covered (93.35%)

1.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 437.1 08 Mar 2019 09:53PM UTC 0
93.35
Travis Job 437.1
2 437.2 08 Mar 2019 09:53PM UTC 0
93.35
Travis Job 437.2
Source Files on build 437
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #437
  • Pull Request #132
  • PR Base - master (#427)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc