Skip to content

adnaan/statsdwrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Usage:

r := chi.NewRouter()
statsdClient, _ := statsd.New(
  statsd.Prefix("myapp"),
  statsd.Address("localhost:8125"),
)
wrap := statsdwrap.NewChi("user_service", statsdClient)
handleHome := func(w http.ResponseWriter, r *http.Request) {
	time.Sleep(time.Millisecond * 1000)
	w.WriteHeader(http.StatusOK)
	w.Write([]byte("OK"))
}
r.Get(wrap.HandlerFunc("home", "/", handleHome))

About

A http handler wrapper for statsd

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages