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:
machine424 2025-06-09 13:53:00 +02:00 committed by Ayoub Mrini
parent 1d79f0f47e
commit 020e803ee0

View File

@ -508,19 +508,3 @@ func (m *Manager) registerProviders(cfgs Configs, setName string) int {
}
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)
}