Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
liguozhuang committed Sep 24, 2024
1 parent 3087146 commit 9437aa5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/plugins/inputs/kubernetesprometheus/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,19 @@ func (ipt *Input) Resume() error {
}
}

func newPauseVar() *atomic.Bool {
b := &atomic.Bool{}
b.Store(true)
return b
}

func init() { //nolint:gochecknoinits
setupMetrics()
inputs.Add(inputName, func() inputs.Input {
return &Input{
NodeLocal: true,
chPause: make(chan bool, inputs.ElectionPauseChannelLength),
pause: &atomic.Bool{},
pause: newPauseVar(),
feeder: dkio.DefaultFeeder(),
}
})
Expand Down

0 comments on commit 9437aa5

Please sign in to comment.