mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 02:30:45 +00:00
17 lines
350 B
Go
17 lines
350 B
Go
package tag
|
|
|
|
import "github.com/weaveworks/scope/report"
|
|
|
|
// Tagger tags nodes with value-add node metadata.
|
|
type Tagger interface {
|
|
Tag(r report.Report) report.Report
|
|
}
|
|
|
|
// Apply tags the report with all the taggers.
|
|
func Apply(r report.Report, taggers []Tagger) report.Report {
|
|
for _, tagger := range taggers {
|
|
r = tagger.Tag(r)
|
|
}
|
|
return r
|
|
}
|