mirror of
https://github.com/foomo/keel.git
synced 2026-04-15 01:54:38 +00:00
main
Some checks failed
Test Branch / test (push) Has been cancelled
feat: bump deps
keel
Opinionated way to run services on Kubernetes
Stack
- Zap
- Nats
- Viper
- GoTSRPC
- Temporal
- OpenTelemetry
Examples
See the examples folder for usages
package main
import (
"net/http"
"github.com/foomo/keel"
"github.com/foomo/keel/service"
)
func main() {
svr := keel.NewServer(
keel.WithHTTPZapService(true),
keel.WithHTTPViperService(true),
keel.WithHTTPPrometheusService(true),
)
l := svr.Logger()
svs := newService()
svr.AddService(
service.NewHTTP(l, "demo", "localhost:8080", svs),
)
svr.Run()
}
func newService() *http.ServeMux {
s := http.NewServeMux()
s.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte("OK"))
})
return s
}
How to Contribute
Contributions are welcome! Please read the contributing guide.
License
Distributed under MIT License, please read the license file for more details.
Languages
Go
99%
Makefile
1%
