mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-06 14:17:12 +02:00
chore(discovery): remove unused StaticProvider struct, library users can easily define it on their side
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
This commit is contained in:
parent
1d79f0f47e
commit
020e803ee0
@ -508,19 +508,3 @@ func (m *Manager) registerProviders(cfgs Configs, setName string) int {
|
|||||||
}
|
}
|
||||||
return failed
|
return failed
|
||||||
}
|
}
|
||||||
|
|
||||||
// StaticProvider holds a list of target groups that never change.
|
|
||||||
type StaticProvider struct {
|
|
||||||
TargetGroups []*targetgroup.Group
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run implements the Worker interface.
|
|
||||||
func (sd *StaticProvider) Run(ctx context.Context, ch chan<- []*targetgroup.Group) {
|
|
||||||
// We still have to consider that the consumer exits right away in which case
|
|
||||||
// the context will be canceled.
|
|
||||||
select {
|
|
||||||
case ch <- sd.TargetGroups:
|
|
||||||
case <-ctx.Done():
|
|
||||||
}
|
|
||||||
close(ch)
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user