memos/plugin/metrics/collector.go
2023-01-05 20:56:50 +08:00

15 lines
287 B
Go

package metric
// Metric is the API message for metric.
type Metric struct {
ID string
Name string
Labels map[string]string
}
// Collector is the interface definition for metric collector.
type Collector interface {
Identify(id string) error
Collect(metric *Metric) error
}