Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amitu/gutils
various go related utilities
https://github.com/amitu/gutils
Last synced: 1 day ago
JSON representation
various go related utilities
- Host: GitHub
- URL: https://github.com/amitu/gutils
- Owner: amitu
- Created: 2014-03-05T12:36:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-16T11:05:36.000Z (over 8 years ago)
- Last Synced: 2024-04-17T02:59:22.266Z (7 months ago)
- Language: Go
- Size: 43 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gutils: Utilities for go
## udpcat
This utility listens on a UDP host:port, and prints whatever it receives
on stdout.### To install
```shell
go get github.com/amitu/gutils/cmds/udpcat
```### Usage
```shell
$ udpcat -help
Usage of udpcat:
-listen="127.0.0.1:4443": Listen on this address.
-quite=false: Quite mode.
-statsonly=false: Only prints stats on stdout and discard data.$ udpcat -listen 127.0.0.1:3334
UDP: Server started on 127.0.0.1:3334.
hello there# from a different shell
$ echo hello there | nc -4 -u localhost 3334
```## udpflood
`udpflood` writes to UDP destination as fast as it can. The speed to write
can be specified on command lines.`udpflood` writes summary about data transmission rate on stdout every second.
### To install
```shell
go get github.com/amitu/gutils/cmds/udpflood
```### Usage
```shell
$ udpflood -help
Usage of udpflood:
-server="127.0.0.1:4443": Send to this address.
-file="somefile.txt": Send the content of this file to server.
```## udp2redis
`udp2redis` listens on udp, writes every packet to to redis in a list.
### To install
```shell
go get github.com/amitu/gutils/cmds/stdin2redis
```### Usage
```shell
$ stdin2redis -help
Usage of udpflood:
-redis="127.0.0.1:6379": Redis server host:port.
-server="127.0.0.1:4443": UDP host:port to listen on.
-drops="/dev/stderr": File to write dropped packets in when redis is down.
First argument is name of redis list to write packets in.
```At startup redis server must be connectable. If redis goes down while the
service is running, it will drop UDP packats, and start pushing it to
redis once it comes back live.