The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/services/store/object/grn.go

15 lines
383 B

package object
// Check if the two GRNs reference to the same object
// we can not use simple `*x == *b` because of the internal settings
func (x *GRN) Equals(b *GRN) bool {
if b == nil {
return false
}
return x == b || (x.TenantId == b.TenantId &&
x.Scope == b.Scope &&
x.Kind == b.Kind &&
x.UID == b.UID)
}
// TODO: this should interpoerate with the GRN string flavor