fingerprintLabels produces a fingerprint unique to the given pairs of label values. MUST contain an even number of arguments (key:value), otherwise it will panic.
(lbs ...string)
| 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. |
| 476 | func fingerprintLabels(lbs ...string) model.Fingerprint { |
| 477 | if len(lbs)%2 != 0 { |
| 478 | panic("imbalanced set of label pairs given") |
| 479 | } |
| 480 | |
| 481 | lbsSet := make(model.LabelSet, len(lbs)/2) |
| 482 | for i := 0; i < len(lbs); i += 2 { |
| 483 | k := lbs[i] |
| 484 | v := lbs[i+1] |
| 485 | lbsSet[model.LabelName(k)] = model.LabelValue(v) |
| 486 | } |
| 487 | |
| 488 | return lbsSet.Fingerprint() // FastFingerprint does not sort the labels. |
| 489 | } |
| 490 | |
| 491 | // updateSignallingInterceptor intercepts bulk update calls to the store, and waits on the "proceed" condition to be |
| 492 | // signaled by the caller so it can continue. |
no outgoing calls
no test coverage detected