collector.go 287 B

1234567891011121314
  1. package metric
  2. // Metric is the API message for metric.
  3. type Metric struct {
  4. ID string
  5. Name string
  6. Labels map[string]string
  7. }
  8. // Collector is the interface definition for metric collector.
  9. type Collector interface {
  10. Identify(id string) error
  11. Collect(metric *Metric) error
  12. }