MCPcopy
hub / github.com/prometheus/client_golang / counter

Struct counter

prometheus/counter.go:103–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103type counter struct {
104 // valBits contains the bits of the represented float64 value, while
105 // valInt stores values that are exact integers. Both have to go first
106 // in the struct to guarantee alignment for atomic operations.
107 // http://golang.org/pkg/sync/atomic/#pkg-note-BUG
108 valBits uint64
109 valInt uint64
110
111 selfCollector
112 desc *Desc
113
114 createdTs *timestamppb.Timestamp
115 labelPairs []*dto.LabelPair
116 exemplar atomic.Value // Containing nil or a *dto.Exemplar.
117
118 // now is for testing purposes, by default it's time.Now.
119 now func() time.Time
120}
121
122func (c *counter) Desc() *Desc {
123 return c.desc

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected