Go to file
2024-04-15 10:22:37 +02:00
.github chore: group dependencies 2024-04-15 09:08:49 +02:00
.husky feat: update deps and setup 2023-08-11 09:55:34 +02:00
config style: fix typo 2023-09-11 11:52:26 +02:00
env feat: add mongo and refactor readme 2023-09-08 22:24:31 +02:00
errors chore: use new Unwrap() []error 2023-07-06 11:28:22 +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: fix lint errors 2022-08-12 15:58:56 +02:00
log feat: update logging format 2024-03-22 10:37:29 +01: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 feat: bump deps 2024-03-15 16:52:18 +01:00
persistence Merge branch 'feature/graceful-shutdown' of github.com:foomo/keel into feature/otel-update 2024-03-15 16:29:05 +01:00
service refactor: use standard errors 2024-04-15 09:42:53 +02:00
telemetry revert: remove graceful timeout 2024-04-15 09:09:12 +02:00
test wip: update otel 2023-08-11 08:58:46 +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 workflows 2024-03-25 08:20:18 +01: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 revert: remove graceful timeout 2024-04-15 09:09:12 +02:00
go.sum revert: remove graceful timeout 2024-04-15 09:09:12 +02: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 graceful timeout 2024-04-15 09:09:12 +02:00
server.go refactor: move log 2024-04-15 10:12:48 +02:00
service.go feat: add name 2021-11-16 15:31:09 +01:00
serviceenabler.go fix: closed race condition 2023-10-03 11:16:33 +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.