lib/promscrape/discovery/kubernetes: remove superflouos mustStart and mustStop functions

This commit is contained in:
Aliaksandr Valialkin 2021-04-05 22:41:48 +03:00
parent 4a0d06d1db
commit 5f593b0ed3
2 changed files with 1 additions and 9 deletions

View file

@ -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":

View file

@ -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()
}
}