()
| 12 | } |
| 13 | |
| 14 | func NewMetricsCollector() *MetricsCollector { |
| 15 | return &MetricsCollector{ |
| 16 | totalValue: atomic.NewUint64(0), |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | // Add adds new bytes read to TotalValue. this method is thread safe and |
| 21 | // satisfies the common.MetricsCallback type so it's used as callback at a lot of places |
no outgoing calls