kit

module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: MIT

README

go-kit Go Reference Go Report Card Build Test

go kit for microservice

Features

  • logger zap
  • metrics prometheus
  • tracing opentelemetry
  • breaker go-zero
  • shedder go-zero
  • health prober
  • pprof

All features can be controlled passing command line parameters.

$ go run ./_examples/gin/main.go -h

Usage:
   [flags]

Flags:
      --breaker.disable               If disable breaker
  -h, --help                          help for this command
      --inner.addr string             Inner metrics/pprof http server addr (default ":6060")
      --inner.disable                 If disable inner http server
      --inner.grace-period duration   Inner http exit grace period
      --inner.log-control             If enable logger level control, GET PUT /log/level
      --inner.with-metrics            If expose metrics router, /metrics (default true)
      --inner.with-pprof              If enable pprof routes, /debug/pprof/*
      --log.caller                    If with caller field
      --log.encoding string           Zap log encoding, console json or others you registered
      --log.level string              Log level, one of zap level (default "info")
      --log.prod                      If use zap log production preset
      --shedder.cpu-threshold int     CpuThreshold config for adaptive shedder, set 0 to disable (default 900)

Examples

License

MIT © zcong1993

Directories

Path Synopsis
pkg
log
runutil
Package runutil provides helpers to advanced function scheduling control like repeat or retry.
Package runutil provides helpers to advanced function scheduling control like repeat or retry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL