| 101 | } |
| 102 | |
| 103 | type 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 | |
| 122 | func (c *counter) Desc() *Desc { |
| 123 | return c.desc |
nothing calls this directly
no outgoing calls
no test coverage detected