CurryWith returns a vector curried with the provided labels, i.e. the returned vector has those labels pre-set for all labeled operations performed on it. The cardinality of the curried vector is reduced accordingly. The order of the remaining labels stays the same (just with the curried labels take
(labels Labels)
| 312 | // registered with a given registry (usually the uncurried version). The Reset |
| 313 | // method deletes all metrics, even if called on a curried vector. |
| 314 | func (v *CounterVec) CurryWith(labels Labels) (*CounterVec, error) { |
| 315 | vec, err := v.MetricVec.CurryWith(labels) |
| 316 | if vec != nil { |
| 317 | return &CounterVec{vec}, err |
| 318 | } |
| 319 | return nil, err |
| 320 | } |
| 321 | |
| 322 | // MustCurryWith works as CurryWith but panics where CurryWith would have |
| 323 | // returned an error. |
no test coverage detected