mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 23:39:48 +01:00
lib/promscrape/discovery/kubernetes: make golangci-lint
happy by removing empty branches
This commit is contained in:
parent
180829b8c2
commit
110a888e39
@ -573,15 +573,11 @@ func (uw *urlWatcher) readObjectUpdateStream(r io.Reader) error {
|
|||||||
key := o.key()
|
key := o.key()
|
||||||
uw.gw.mu.Lock()
|
uw.gw.mu.Lock()
|
||||||
if _, ok := uw.objectsByKey[key]; !ok {
|
if _, ok := uw.objectsByKey[key]; !ok {
|
||||||
if we.Type == "MODIFIED" {
|
// if we.Type == "MODIFIED" is expected condition after recovering from the bookmarked resourceVersion.
|
||||||
// This is expected condition after recovering from the bookmarked resourceVersion.
|
|
||||||
}
|
|
||||||
uw.objectsCount.Inc()
|
uw.objectsCount.Inc()
|
||||||
uw.objectsAdded.Inc()
|
uw.objectsAdded.Inc()
|
||||||
} else {
|
} else {
|
||||||
if we.Type == "ADDED" {
|
// if we.Type == "ADDED" is expected condition after recovering from the bookmarked resourceVersion.
|
||||||
// This is expected condition after recovering from the bookmarked resourceVersion.
|
|
||||||
}
|
|
||||||
uw.objectsUpdated.Inc()
|
uw.objectsUpdated.Inc()
|
||||||
}
|
}
|
||||||
uw.objectsByKey[key] = o
|
uw.objectsByKey[key] = o
|
||||||
@ -599,9 +595,7 @@ func (uw *urlWatcher) readObjectUpdateStream(r io.Reader) error {
|
|||||||
}
|
}
|
||||||
key := o.key()
|
key := o.key()
|
||||||
uw.gw.mu.Lock()
|
uw.gw.mu.Lock()
|
||||||
if _, ok := uw.objectsByKey[key]; !ok {
|
if _, ok := uw.objectsByKey[key]; ok {
|
||||||
// This is expected condition after recovering from the bookmarked resourceVersion.
|
|
||||||
} else {
|
|
||||||
uw.objectsCount.Dec()
|
uw.objectsCount.Dec()
|
||||||
uw.objectsRemoved.Inc()
|
uw.objectsRemoved.Inc()
|
||||||
delete(uw.objectsByKey, key)
|
delete(uw.objectsByKey, key)
|
||||||
|
Loading…
Reference in New Issue
Block a user