# Functions
ContextExperimentByteCounter retrieves the possibly-nil experiment byte counter from the context.
ContextSessionByteCounter retrieves the possibly-nil session byte counter from the context.
MaybeWrapConn is like wrap if counter is not nil, otherwise it's a no-op.
MaybeWrapHTTPTransport takes in input an HTTPTransport and either wraps it to perform byte counting, if this counter is not nil, or just returns to the caller the original transport, when the counter is nil.
MaybeWrapSystemResolver takes in input a Resolver and either wraps it to perform byte counting, if this counter is not nil, or just returns to the caller the original resolver, when the counter is nil.
MaybeWrapWithContextAwareDialer wraps the given dialer with a ContextAwareDialer if the enabled argument is true and otherwise just returns the given dialer.
MaybeWrapWithContextByteCounters wraps a conn with the byte counters that have previosuly been configured into a context.
New creates a new Counter.
WithExperimentByteCounter assigns the experiment byte counter to the context.
WithSessionByteCounter assigns the session byte counter to the context.
WrapConn returns a new conn that uses the given counter.
WrapHTTPTransport creates a new byte-counting-aware HTTP transport.
WrapSystemResolver creates a new byte-counting-aware resolver.
WrapWithContextAwareDialer creates a new ContextAwareDialer.
WrapWithContextAwareSystemResolver wraps the given resolver with a resolver that is aware of context-byte counting.
# Structs
ContextAwareSystemResolver is a [model.Resolver] that knows how to count bytes sent and received.
Counter counts bytes sent and received.