(req *trident.PrometheusLabelRequest)
| 225 | } |
| 226 | |
| 227 | func (s *LabelSynchronizer) splitData(req *trident.PrometheusLabelRequest) *dataToEncode { |
| 228 | toEncode := newDataToEncode(s.cache) |
| 229 | for _, m := range req.GetRequestLabels() { |
| 230 | mn := m.GetMetricName() |
| 231 | toEncode.tryAppendMetricName(mn) |
| 232 | for _, l := range m.GetLabels() { |
| 233 | ln := l.GetName() |
| 234 | lv := l.GetValue() |
| 235 | toEncode.tryAppendLabelName(ln) |
| 236 | toEncode.tryAppendLabelValue(lv) |
| 237 | toEncode.tryAppendLabel(ln, lv) |
| 238 | toEncode.tryAppendMetricAPPLabelLayout(mn, ln) |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | return toEncode |
| 243 | } |
| 244 | |
| 245 | func (s *LabelSynchronizer) generateSyncRequest(toEncode *dataToEncode) *controller.SyncPrometheusRequest { |
| 246 | return &controller.SyncPrometheusRequest{ |
no test coverage detected