memos/plugin/metrics/collector.go

15 lines
287 B
Go
Raw Normal View History

2022-10-29 06:15:39 +03:00
package metric
2023-01-05 15:56:50 +03:00
// Metric is the API message for metric.
type Metric struct {
ID string
Name string
Labels map[string]string
}
2022-10-29 06:15:39 +03:00
// Collector is the interface definition for metric collector.
type Collector interface {
2023-01-05 15:56:50 +03:00
Identify(id string) error
2022-10-29 06:15:39 +03:00
Collect(metric *Metric) error
}