github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/agent/ebpfspy/sd/sd.go (about) 1 package sd 2 3 import ( 4 "context" 5 "github.com/pyroscope-io/pyroscope/pkg/agent/spy" 6 ) 7 8 type ServiceDiscovery interface { 9 // Refresh called every 10s before session reset 10 Refresh(ctx context.Context) error 11 12 // GetLabels may return nil 13 GetLabels(pid uint32) *spy.Labels 14 } 15 16 type NoopServiceDiscovery struct { 17 } 18 19 func (NoopServiceDiscovery) Refresh(_ context.Context) error { 20 return nil 21 } 22 23 func (NoopServiceDiscovery) GetLabels(_ uint32) *spy.Labels { 24 return nil 25 }