Method
Add
(batch []*controller.PrometheusLabelName)
Source from the content-addressed store, hash-verified
| 94 | } |
| 95 | |
| 96 | func (ln *labelName) Add(batch []*controller.PrometheusLabelName) { |
| 97 | ln.mu.Lock() |
| 98 | defer ln.mu.Unlock() |
| 99 | for _, item := range batch { |
| 100 | ln.pendingNameToID[item.GetName()] = int(item.GetId()) |
| 101 | ln.pendingIDToName[int(item.GetId())] = item.GetName() |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | func (ln *labelName) refresh(args ...interface{}) error { |
| 106 | items, err := ln.load() |
Callers
nothing calls this directly
Tested by
no test coverage detected