Networked dispatch table
Petrel provides a fire-and-forget way to add TCP, TLS, or Unix socket interfaces to applications written in Go. It handles network I/O and dispatches requests from clients. All you need to do is watch its messaging channel for events you'd like to log or act upon.
Current version: 0.22.0 (2016-03-30) (Release notes)
go get firepear.net/petrel
go vet, and
go test -race
cleanly. Test coverage is
What is it used for?
Petrel's original use case was administrative/backend interfaces to daemons, over Unix domain sockets.
TCP and TLS connections are now supported as well, and input handling has been made more flexible so that JSON or other structured data can be fed into programs.
So petrel makes it easy to add call/response type network interfaces to any piece of software.
Despite support for TLS, Petrel does not yet support maximum transfer size limits. This makes it vulnerable to DoSing, so you may not want to use it on public networks at this time. (This is coming soon!)