Files
postmoogle/vendor/gitlab.com/etke.cc/go/psd/target.go
2024-02-19 19:52:03 +02:00

13 lines
331 B
Go

package psd
// Target is a struct that represents a single set of targets in Prometheus Service Discovery
type Target struct {
Targets []string `json:"targets"`
Labels map[string]string `json:"labels"`
}
// GetDomain returns the domain of the target
func (t *Target) GetDomain() string {
return t.Labels["domain"]
}