Cloud native log shipping daemon written in Go
pkg | ||
vendor | ||
.drone.yml | ||
.gitignore | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
main.go | ||
README.md |
logmower-shipper
Watches log directory for logs, and ships them to mongo.
- Running:
go run .
- Building:
go build .
Files
pkg/globals
defines globals. This is used for Prometheus namespace, and for forwarding static global CLI configuration with less clutter.main.go
serves/metrics
and runswatcher.go
.pkg/watcher
main routine; initializes (includingmongo.go
) and watches for new log files.pkg/mongo
provides statically safe and central tools to interact with the database.pkg/util
provides additional utility functions.
pkg/file
handles file lifecycle; watches files and tails them, streaming lines topkg/lines
.pkg/lines
processes lines and streams them topkg/sender
.pkg/sender
batches lines and ships them to mongo.