MCPcopy
hub / github.com/prometheus/prometheus / discovery

Struct discovery

documentation/examples/custom-sd/adapter-usage/main.go:89–95  ·  view source on GitHub ↗

Note: This is the struct with your implementation of the Discoverer interface (see Run function). Discovery retrieves target information from a Consul server and updates them via watches.

Source from the content-addressed store, hash-verified

87// Note: This is the struct with your implementation of the Discoverer interface (see Run function).
88// Discovery retrieves target information from a Consul server and updates them via watches.
89type discovery struct {
90 address string
91 refreshInterval int
92 tagSeparator string
93 logger *slog.Logger
94 oldSourceList map[string]bool
95}
96
97func (*discovery) parseServiceNodes(resp *http.Response, name string) (*targetgroup.Group, error) {
98 var nodes []*CatalogService

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected