cloudflare / certmgr

Automated certificate management using a CFSSL CA.
BSD 2-Clause "Simplified" License
218 stars 40 forks source link

Refactoring and bugfixing #64

Closed ferringb closed 5 years ago

ferringb commented 5 years ago

Roughly: 1) minor metric related fixes. Convert WatchCount to a gauge (since it can go in reverse), and fix the / index. Additionally, force a namespace so all certmgr specific metrics are prefixed with 'certmgr_'. 2) Refactor and gut duplication in mgr/manager.go. Specifically eliminate the queue architecture since it broke encapsulation, move relevant methods to relevant instances, and simplify processing so that wake intervals are actually synchronous in execution and evaluation.

The refactoring should be transparent to end users; it's just code cleanup.

ferringb commented 5 years ago

Note: this is the initial batch of refactoring. I have more I'm intending on following up with, but I'm breaking this out as the first digestible chunk.

ferringb commented 5 years ago

fixing the lint failure, pardon.