fingerprintLabelPairs produces a fingerprint unique to the given combination of label pairs.
(lbs []*dto.LabelPair)
| 463 | |
| 464 | // fingerprintLabelPairs produces a fingerprint unique to the given combination of label pairs. |
| 465 | func fingerprintLabelPairs(lbs []*dto.LabelPair) model.Fingerprint { |
| 466 | pairs := make([]string, 0, len(lbs)*2) |
| 467 | for _, lp := range lbs { |
| 468 | pairs = append(pairs, lp.GetName(), lp.GetValue()) |
| 469 | } |
| 470 | |
| 471 | return fingerprintLabels(pairs...) |
| 472 | } |
| 473 | |
| 474 | // fingerprintLabels produces a fingerprint unique to the given pairs of label values. |
| 475 | // MUST contain an even number of arguments (key:value), otherwise it will panic. |
no test coverage detected