newMeteredConn creates a new metered connection wrapper.
(conn net.Conn, sentBytes, receivedBytes prometheus.Counter)
| 31 | |
| 32 | // newMeteredConn creates a new metered connection wrapper. |
| 33 | func newMeteredConn(conn net.Conn, sentBytes, receivedBytes prometheus.Counter) *meteredConn { |
| 34 | return &meteredConn{ |
| 35 | Conn: conn, |
| 36 | sentBytesCounter: sentBytes, |
| 37 | receivedBytesCounter: receivedBytes, |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // Read implement net.Conn. |
| 42 | func (c *meteredConn) Read(b []byte) (n int, err error) { |
no outgoing calls
no test coverage detected