Documentation ¶
Index ¶
- type MetricFunc
- type UsageReport
- type UsageStats
- type UsageStatsService
- func (uss *UsageStatsService) GetConcurrentUsersStats(ctx context.Context) (*concurrentUsersStats, error)
- func (uss *UsageStatsService) GetUsageReport(ctx context.Context) (UsageReport, error)
- func (uss *UsageStatsService) Init() error
- func (uss *UsageStatsService) RegisterMetric(name string, fn MetricFunc)
- func (uss *UsageStatsService) Run(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricFunc ¶
type MetricFunc func() (interface{}, error)
type UsageReport ¶
type UsageStats ¶
type UsageStats interface { GetUsageReport(ctx context.Context) (UsageReport, error) RegisterMetric(name string, fn MetricFunc) }
type UsageStatsService ¶
type UsageStatsService struct { Cfg *setting.Cfg `inject:""` Bus bus.Bus `inject:""` SQLStore *sqlstore.SQLStore `inject:""` AlertingUsageStats alerting.UsageStatsQuerier `inject:""` License models.Licensing `inject:""` // contains filtered or unexported fields }
func (*UsageStatsService) GetConcurrentUsersStats ¶
func (uss *UsageStatsService) GetConcurrentUsersStats(ctx context.Context) (*concurrentUsersStats, error)
func (*UsageStatsService) GetUsageReport ¶
func (uss *UsageStatsService) GetUsageReport(ctx context.Context) (UsageReport, error)
func (*UsageStatsService) Init ¶
func (uss *UsageStatsService) Init() error
func (*UsageStatsService) RegisterMetric ¶
func (uss *UsageStatsService) RegisterMetric(name string, fn MetricFunc)
Click to show internal directories.
Click to hide internal directories.