boulder/ca
Jacob Hoffman-Andrews 0bfb542514 Use fields, not globals, for stats (#2790)
Following up on #2752, we don't need to use global vars for our Prometheus stats. We already have a custom registry plumbed through using Scope objects. In this PR, expose the MustRegister method of that registry through the Scope interface, and move existing global vars to be fields of objects. This should improve testability somewhat.

Note that this has a bit of an unfortunate side effect: two instances of the same stats-using class (e.g. VA) can't use the same Scope object, because their MustRegister calls will conflict. In practice this is fine since we never instantiate duplicates of the the classes that use stats, but it's something we should keep an eye on.

Updates #2733
2017-06-06 12:09:31 -07:00
..
proto Update github.com/grpc-ecosystem/go-grpc-prometheus and google.golang.org/grpc (#2637) 2017-04-03 11:13:48 -07:00
testdata Add duplicate-must-staple test CSR, and use it 2016-02-16 14:26:13 -05:00
ca.go Use fields, not globals, for stats (#2790) 2017-06-06 12:09:31 -07:00
ca_test.go Use fields, not globals, for stats (#2790) 2017-06-06 12:09:31 -07:00