drpcstats
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
README¶
package drpcstats
import "storj.io/drpc/drpcstats"
Package drpcstats contatins types for stat collection.
Usage
type Stats
type Stats struct {Read uint64Written uint64}Stats keeps counters of read and written bytes.
func (*Stats) AddRead
func (s *Stats) AddRead(n uint64)AddRead atomically adds n bytes to the Read counter.
func (*Stats) AddWritten
func (s *Stats) AddWritten(n uint64)AddWritten atomically adds n bytes to the Written counter.
func (*Stats) AtomicClone
func (s *Stats) AtomicClone() StatsAtomicClone returns a copy of the stats that is safe to use concurrently withAdd methods.
Documentation¶
Overview¶
Package drpcstats contatins types for stat collection.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeStats¶
Stats keeps counters of read and written bytes.
func (*Stats)AddWritten¶
AddWritten atomically adds n bytes to the Written counter.
func (*Stats)AtomicClone¶
AtomicClone returns a copy of the stats that is safe to use concurrently with Add methods.