(batch []*controller.PrometheusLabel)
| 143 | } |
| 144 | |
| 145 | func (l *label) Add(batch []*controller.PrometheusLabel) { |
| 146 | l.mu.Lock() |
| 147 | defer l.mu.Unlock() |
| 148 | for _, item := range batch { |
| 149 | nameID, ok1 := l.labelName.GetIDByName(item.GetName()) |
| 150 | valueID, ok2 := l.labelValue.GetIDByValue(item.GetValue()) |
| 151 | if ok1 && ok2 { |
| 152 | l.pending[IDLabelKey{NameID: nameID, ValueID: valueID}] = int(item.GetId()) |
| 153 | } |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func (l *label) refresh(args ...interface{}) error { |
| 158 | var count int64 |