grafana/pkg/server/usagestatssvcs/usage_stats_providers_registry.go
Artur Wierzbicki 2136e680c4
Previews: remove dashboard previews backend (#66176)
* remove dashboard previews backend

* remove dashboard previews backend

* bring back the migration

* bring back the migration

* bring back the migration
2023-04-13 21:42:24 +04:00

27 lines
659 B
Go

package usagestatssvcs
import (
"github.com/grafana/grafana/pkg/registry"
"github.com/grafana/grafana/pkg/services/accesscontrol"
)
func ProvideUsageStatsProvidersRegistry(
accesscontrol accesscontrol.Service,
) *UsageStatsProvidersRegistry {
return NewUsageStatsProvidersRegistry(
accesscontrol,
)
}
type UsageStatsProvidersRegistry struct {
Services []registry.ProvidesUsageStats
}
func NewUsageStatsProvidersRegistry(services ...registry.ProvidesUsageStats) *UsageStatsProvidersRegistry {
return &UsageStatsProvidersRegistry{services}
}
func (r *UsageStatsProvidersRegistry) GetServices() []registry.ProvidesUsageStats {
return r.Services
}