forked from pallavidn/monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
repository_entity.go
27 lines (20 loc) · 1002 Bytes
/
repository_entity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package repository
import (
"github.com/turbonomic/turbo-go-monitoring/pkg/model"
)
// RepositoryEntity defines a set of interfaces to access a repository entity in the metric Repository.
// It has per-entity info such as id, type, and node ip, and interfaces to get and set metric values.
type RepositoryEntity interface {
// GetId() returns the associated entity id
GetId() model.EntityId
// GetType() returns the type of the associated entity
GetType() model.EntityType
// GetTypedId() returns the type and id of the associated entity
GetTypedId() model.EntityTypedId
// GetAllMetrics() returns all metrics of the entity in the form of EntityMetricMap
GetAllMetrics() EntityMetricMap
// GetMetricValue() returns the metric value associated with the given key in this entity
GetMetricValue(metricKey EntityMetricKey) (model.MetricValue, error)
// SetMetricValue() sets the given metric key-value in this entity
SetMetricValue(metricKey EntityMetricKey, value model.MetricValue)
}