LogApi
Logapi is a tool to run alongside your containers that will allow you to interpret logs and serve them as a rest api
Usage
All the command are available in the Makefile
but the easiest way is to docker-compose up web
and curl 127.0.0.1:8080/files
you can also try tilt up
to test the application directly on kubernetes
All commands will use the example log file Β΄examples/log.txt'
Test
'go test pkg/...'
Architecture
π¦ cmd
β π *.go # cli definition
π¦ pkg
ββββπ conf # Configuration management and stop signal handling
ββββπ file # The file pagckage that handles log parsing and http translation
ββββπ server # Handles the http server bolierplate
ββββπ store # Defines the storage
π¦ kustomize # Kubernetes manifests
π config.yaml # The default config for the app
π logapi.go # common interfaces
π Dockerfile # The application image definition
π Tiltfile # tilt is a tool that allows you to run your code with live reload on your local k8s cluster
π docker-compose.yaml # To make docker commands easier
π Makefile # Colletion of usefull commands
TODO (Things that are kinda of outside scope)
- Handle file update (Maybe watch the file)
- Read only parts of the file that were not read (Maybe index the reads)
- handle multiple files (Maybe use the file name as index)
- Maybe Create A view layer for store
- Handle more test cases