mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 19:00:54 -06:00
30 lines
735 B
Go
30 lines
735 B
Go
package usagestatssvcs
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/registry"
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
"github.com/grafana/grafana/pkg/services/user"
|
|
)
|
|
|
|
func ProvideUsageStatsProvidersRegistry(
|
|
accesscontrol accesscontrol.Service,
|
|
user user.Service,
|
|
) *UsageStatsProvidersRegistry {
|
|
return NewUsageStatsProvidersRegistry(
|
|
accesscontrol,
|
|
user,
|
|
)
|
|
}
|
|
|
|
type UsageStatsProvidersRegistry struct {
|
|
Services []registry.ProvidesUsageStats
|
|
}
|
|
|
|
func NewUsageStatsProvidersRegistry(services ...registry.ProvidesUsageStats) *UsageStatsProvidersRegistry {
|
|
return &UsageStatsProvidersRegistry{services}
|
|
}
|
|
|
|
func (r *UsageStatsProvidersRegistry) GetServices() []registry.ProvidesUsageStats {
|
|
return r.Services
|
|
}
|