mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/promscrape/discovery/kubernetes: remove superflouos mustStart and mustStop functions
This commit is contained in:
parent
4a0d06d1db
commit
5f593b0ed3
2 changed files with 1 additions and 9 deletions
|
@ -14,14 +14,6 @@ type apiConfig struct {
|
|||
aw *apiWatcher
|
||||
}
|
||||
|
||||
func (ac *apiConfig) mustStart() {
|
||||
ac.aw.mustStart()
|
||||
}
|
||||
|
||||
func (ac *apiConfig) mustStop() {
|
||||
ac.aw.mustStop()
|
||||
}
|
||||
|
||||
func newAPIConfig(sdc *SDConfig, baseDir string, swcFunc ScrapeWorkConstructorFunc) (*apiConfig, error) {
|
||||
switch sdc.Role {
|
||||
case "node", "pod", "service", "endpoints", "endpointslices", "ingress":
|
||||
|
|
|
@ -67,6 +67,6 @@ func (sdc *SDConfig) MustStart(baseDir string, swcFunc ScrapeWorkConstructorFunc
|
|||
func (sdc *SDConfig) MustStop() {
|
||||
if sdc.cfg != nil {
|
||||
// sdc.cfg can be nil on MustStart error.
|
||||
sdc.cfg.mustStop()
|
||||
sdc.cfg.aw.mustStop()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue