mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
|
Some checks failed
Test / test (push) Has been cancelled
chore(deps): bump the github-actions group across 1 directory with 2 updates |
||
|---|---|---|
| .github | ||
| .husky | ||
| config | ||
| env | ||
| errors | ||
| examples | ||
| healthz | ||
| integration | ||
| interfaces | ||
| jwt | ||
| keeltest | ||
| log | ||
| markdown | ||
| metrics | ||
| net | ||
| persistence | ||
| service | ||
| telemetry | ||
| time | ||
| utils/net/http | ||
| .editorconfig | ||
| .gitignore | ||
| .golangci.yml | ||
| .goreleaser.yml | ||
| .husky.yaml | ||
| .prettierrc.yml | ||
| closer.go | ||
| errors.go | ||
| go.mod | ||
| go.sum | ||
| healthz.go | ||
| ldflags.go | ||
| LICENSE | ||
| Makefile | ||
| option.go | ||
| README.md | ||
| server_test.go | ||
| server.go | ||
| service.go | ||
| serviceenabler.go | ||
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
Please refer to the CONTRIBUTING details and follow the CODE_OF_CONDUCT and SECURITY guidelines.
License
Distributed under MIT License, please see license file within the code for more details.
