master
go 30 lines 653 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package httpsd
4
5 import (
6 "fmt"
7
8 "github.com/netdata/netdata/go/plugins/plugin/agent/discovery/sd/model"
9 )
10
11 type targetGroup struct {
12 source string
13 targets []model.Target
14 }
15
16 func (g *targetGroup) Provider() string { return fullName }
17 func (g *targetGroup) Source() string { return g.source }
18 func (g *targetGroup) Targets() []model.Target { return g.targets }
19
20 type target struct {
21 model.Base `hash:"ignore"`
22
23 hash uint64
24 label string
25
26 Item any
27 }
28
29 func (t *target) TUID() string { return fmt.Sprintf("http_%s_%x", t.label, t.hash) }
30 func (t *target) Hash() uint64 { return t.hash }