MCPcopy Index your code
hub / github.com/coder/coder / Factory

Struct Factory

coderd/promoauth/oauth2.go:61–65  ·  view source on GitHub ↗

Factory allows us to have 1 set of metrics for all oauth2 providers. Primarily to avoid any prometheus errors registering duplicate metrics.

Source from the content-addressed store, hash-verified

59// Factory allows us to have 1 set of metrics for all oauth2 providers.
60// Primarily to avoid any prometheus errors registering duplicate metrics.
61type Factory struct {
62 metrics *metrics
63 // optional replace now func
64 Now func() time.Time
65}
66
67// metrics is the reusable metrics for all oauth2 providers.
68type metrics struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected