rl

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2017 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

rl

Rate limit messages from stdin. (keep or drop those exceeding the limit)

Use case

  • When sending data to mattermost (or slack), it's convenient to limit the amount of data that can be sent.

E.g. when using mattertee to send output to mattermost, you can now just pipe it through rl so that your channels aren't being flooded.

  • Tailing -f a very quickly increasing logfile when in tmux remotely ;)

Installing

Binaries

Binaries can be found [here] (https://github.com/42wim/rl/releases/)

Building

Go 1.6+ is required. Make sure you have Go properly installed, including setting up your [GOPATH] (https://golang.org/doc/code.html#GOPATH )

cd $GOPATH
go get github.com/42wim/rl

You should now have rl binary in the bin directory:

$ ls bin/
rl

Usage

Usage of ./rl:
  -k    keep the messages instead of dropping them
  -r int
        limit to r messages per second (drops those exceeding the limit) (default 5)


(the number of dropped messages will be sent to stderr, when not using the -k switch)

Example

journalctl -f | rl -k -r 5

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
⌂ 换网址