MCPcopy
hub / github.com/prometheus/prometheus / Adapter

Struct Adapter

documentation/examples/custom-sd/adapter/adapter.go:50–58  ·  view source on GitHub ↗

Adapter runs an unknown service discovery implementation and converts its target groups to JSON and writes to a file for file_sd.

Source from the content-addressed store, hash-verified

48// Adapter runs an unknown service discovery implementation and converts its target groups
49// to JSON and writes to a file for file_sd.
50type Adapter struct {
51 ctx context.Context
52 disc discovery.Discoverer
53 groups map[string]*customSD
54 manager *discovery.Manager
55 output string
56 name string
57 logger *slog.Logger
58}
59
60func mapToArray(m map[string]*customSD) []customSD {
61 arr := make([]customSD, 0, len(m))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected