Go to file
2024-09-23 08:43:31 +02:00
.github Merge branch 'main' into dependabot/github_actions/goreleaser/goreleaser-action-6 2024-07-05 07:02:32 +02:00
.husky feat: update deps and setup 2023-08-11 09:55:34 +02:00
config feat: update & fix lints 2024-04-16 09:38:28 +02:00
env feat: add mongo and refactor readme 2023-09-08 22:24:31 +02:00
errors feat: update & fix lints 2024-04-16 09:38:28 +02:00
examples revert: change from example 2024-04-15 10:22:37 +02:00
healthz feat: add GoRoutine service 2023-09-08 12:17:23 +02:00
integration Merge branch 'main' of github.com:foomo/keel into feature/otel-update 2024-03-15 16:26:06 +01:00
interfaces refactor: rename and modify CloserFunc 2024-03-15 10:10:17 +01:00
jwt feat: update & fix lints 2024-04-16 09:38:28 +02:00
keeltest revert: remove goleak 2024-04-16 09:52:14 +02:00
log feat: update & fix lints 2024-04-16 09:38:28 +02:00
markdown feat: add nats readmer 2023-09-11 10:37:18 +02:00
metrics feat: fence output 2023-09-11 14:14:58 +02:00
net style: reformat 2024-09-23 08:43:11 +02:00
persistence feat: update & fix lints 2024-04-16 09:38:28 +02:00
service revert: read / write timeouts 2024-06-28 16:41:36 +02:00
telemetry fix: lint issue 2024-09-23 08:43:20 +02:00
time feat: add keeltime 2022-01-03 13:20:06 +01:00
utils/net/http feat: wrap server error 2023-07-10 12:22:16 +02:00
.editorconfig chore: linting 2021-11-19 14:16:09 +01:00
.gitignore chore: update github workflow 2023-09-08 12:17:44 +02:00
.golangci.yml chore: update golangci config 2024-09-23 08:43:31 +02:00
.goreleaser.yml chore: update workflows 2024-03-25 08:20:18 +01:00
.husky.yaml chore: update github workflow 2023-09-08 12:17:44 +02:00
.prettierrc.yml chore: update github workflow 2021-11-19 12:29:44 +01:00
closer.go feat: add mongo and refactor readme 2023-09-08 22:24:31 +02:00
CODE_OF_CONDUCT.md feat: update deps and setup 2023-08-11 09:55:34 +02:00
errors.go feat: update graceful shutdown 2024-03-15 11:01:25 +01:00
go.mod feat: retry-go v4 2024-09-23 08:42:57 +02:00
go.sum chore(deps): bump the gomod-update group across 1 directory with 25 updates 2024-07-05 06:54:19 +00:00
healthz.go feat: add mongo and refactor readme 2023-09-08 22:24:31 +02:00
ldflags.go initial commit 2021-05-18 08:34:47 +02:00
LICENSE docs: add license 2021-07-26 15:58:31 +02:00
Makefile chore: run single tests 2024-04-15 09:48:59 +02:00
option.go revert: remove graceful timeout 2024-04-15 09:09:12 +02:00
README.md docs: update readme 2023-09-08 12:28:36 +02:00
server_test.go revert: remove goleak 2024-04-16 09:52:14 +02:00
server.go feat: update & fix lints 2024-04-16 09:38:28 +02:00
service.go feat: add name 2021-11-16 15:31:09 +01:00
serviceenabler.go feat: update & fix lints 2024-04-16 09:38:28 +02:00

keel

Build Status Go Report Card Coverage Status GoDoc

Opinionated way to run services.

Stack

  • Zap
  • Viper
  • Open Telemetry
  • Nats
  • GoTSRPC

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

Make a pull request...

License

Distributed under MIT License, please see license file within the code for more details.