add traffic reset for stats

This commit is contained in:
ginuerzh
2024-12-24 20:11:22 +08:00
parent 914a4622fd
commit 06d993023f
41 changed files with 407 additions and 143 deletions
+2 -2
View File
@@ -9,10 +9,10 @@ import (
// readWriter is an io.ReadWriter with Stats.
type readWriter struct {
io.ReadWriter
stats *stats.Stats
stats stats.Stats
}
func WrapReadWriter(rw io.ReadWriter, stats *stats.Stats) io.ReadWriter {
func WrapReadWriter(rw io.ReadWriter, stats stats.Stats) io.ReadWriter {
if stats == nil {
return rw
}