Skip to content

Commit 17573c7

Browse files
committed
fixup! *: plug in no-op metric implementations for nil fields
1 parent 7e3a93b commit 17573c7

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

drpcconn/conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Options struct {
3030
// rpcs it creates.
3131
CollectStats bool
3232

33-
// CollectMetrics controls whether the client should collect metrics
33+
// CollectMetrics controls whether the client should collect metrics.
3434
CollectMetrics bool
3535

3636
// Metrics holds optional metrics the client will populate.

drpcpool/pool.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ type Options struct {
3636
// no values for any single key.
3737
KeyCapacity int
3838

39-
// Metrics holds optional metrics the pool will populate. If nil,
40-
// no metrics are recorded.
39+
// Metrics holds optional metrics the pool will populate.
4140
Metrics PoolMetrics
4241

4342
// Labels holds optional labels to be attached to all metrics.

drpcserver/server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ type Options struct {
4646
// restrictions. If it returns a non-nil error the connection is rejected.
4747
TLSCipherRestrict func(conn net.Conn) error
4848

49-
// Metrics holds optional metrics the server will populate. If nil, no
50-
// metrics are recorded.
49+
// Metrics holds optional metrics the server will populate.
5150
Metrics ServerMetrics
5251
}
5352

0 commit comments

Comments
 (0)