Help us shape the future of Go! Take the 2026 Go Developer Survey

refresh

package
v0.315.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 74

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery struct {
	// contains filtered or unexported fields
}

Discovery implements the Discoverer interface.

func NewDiscovery

func NewDiscovery(opts Options) *Discovery

NewDiscovery returns a Discoverer function that calls a refresh() function at every interval.

func (*Discovery) Run

func (d *Discovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group)

Run implements the Discoverer interface.

type Options added in v0.50.0

type Options struct {
	Logger              *slog.Logger
	Mech                string
	SetName             string
	Interval            time.Duration
	RefreshF            func(ctx context.Context) ([]*targetgroup.Group, error)
	MetricsInstantiator discovery.RefreshMetricsInstantiator
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL