Skip to content

Commit cff29ae

Browse files
README.md: remove redisstats
This package was deleted in 2018.
1 parent f19ee83 commit cff29ae

File tree

1 file changed

+0
-63
lines changed

1 file changed

+0
-63
lines changed

README.md

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -340,69 +340,6 @@ func main() {
340340
}
341341
```
342342

343-
### Redis
344-
345-
The [github.com/segmentio/stats/redisstats](https://godoc.org/github.com/segmentio/stats/redisstats)
346-
package exposes:
347-
348-
* a decorator of
349-
[`redis.RoundTripper`](https://godoc.org/github.com/segmentio/redis-go#RoundTripper)
350-
which collects metrics for client requests, and
351-
* a decorator or
352-
[`redis.ServeRedis`](https://godoc.org/github.com/segmentio/redis-go#HandlerFunc.ServeRedis)
353-
which collects metrics for server requests.
354-
355-
Here's an example of how to use the decorator on the client side:
356-
357-
```go
358-
package main
359-
360-
import (
361-
"github.com/segmentio/redis-go"
362-
"github.com/segmentio/stats/v5/redisstats"
363-
)
364-
365-
func main() {
366-
stats.Register(datadog.NewClient("localhost:8125"))
367-
defer stats.Flush()
368-
369-
client := redis.Client{
370-
Addr: "127.0.0.1:6379",
371-
Transport: redisstats.NewTransport(&redis.Transport{}),
372-
}
373-
374-
// ...
375-
}
376-
```
377-
378-
And on the server side:
379-
380-
```go
381-
package main
382-
383-
import (
384-
"github.com/segmentio/redis-go"
385-
"github.com/segmentio/stats/v5/redisstats"
386-
)
387-
388-
func main() {
389-
stats.Register(datadog.NewClient("localhost:8125"))
390-
defer stats.Flush()
391-
392-
handler := redis.HandlerFunc(func(res redis.ResponseWriter, req *redis.Request) {
393-
// Implement handler function here
394-
})
395-
396-
server := redis.Server{
397-
Handler: redisstats.NewHandler(&handler),
398-
}
399-
400-
server.ListenAndServe()
401-
402-
// ...
403-
}
404-
```
405-
406343
### Addendum
407344

408345
By default, the stats library will report the running go version when you

0 commit comments

Comments
 (0)