Files
weave-scope/probe/tag/tagger.go
Peter Bourgon d486d1074a Refactor process mappers to taggers
- Reduce tagger interface to operate on reports
- Remove cgroup tagger
2015-06-08 15:04:40 +02:00

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
}