Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberdelia/statsd
A client library for statsd written in Go
https://github.com/cyberdelia/statsd
Last synced: 5 days ago
JSON representation
A client library for statsd written in Go
- Host: GitHub
- URL: https://github.com/cyberdelia/statsd
- Owner: cyberdelia
- License: mit
- Created: 2012-02-17T16:59:48.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2021-08-08T00:15:46.000Z (over 3 years ago)
- Last Synced: 2024-06-18T18:44:45.997Z (5 months ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/cyberdelia/statsd
- Size: 20.5 KB
- Stars: 48
- Watchers: 4
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# statsd
statsd is a client library for statsd written in Go.
## Installation
Download and install :
```
$ go get github.com/cyberdelia/statsd
```Add it to your code :
```go
import "github.com/cyberdelia/statsd"
```## Use
```go
c := statsd.Dial("localhost:8125")
c.Increment("incr", 1, 1)
c.Decrement("decr", 1, 0.1)
c.Timing("timer", 320, 0.1)
c.Time("timer", 0.1, func() {
// do something
})
c.Gauge("gauge", 30, 1)
c.Unique("unique", 765, 1)
```