Documentation ¶
Index ¶
- type MetricRepository
- type MetricService
- type MetricsInfo
- type SQLiteMetricRepository
- func (r *SQLiteMetricRepository) Add(metric common.Metric) error
- func (r *SQLiteMetricRepository) Delete(metrics []common.Metric) error
- func (r *SQLiteMetricRepository) Info() (*MetricsInfo, error)
- func (r *SQLiteMetricRepository) Poll() ([]common.Metric, error)
- func (r *SQLiteMetricRepository) ToggleEnabled(enabled bool) error
- func (r *SQLiteMetricRepository) UserID(tx *sql.Tx) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricRepository ¶
type MetricService ¶
type MetricService struct {
// contains filtered or unexported fields
}
func NewDefaultMetricService ¶
func NewDefaultMetricService(db *sql.DB) *MetricService
func NewMetricService ¶
func NewMetricService(repository MetricRepository, processor common.MetricProcessor, interval time.Duration) *MetricService
func (*MetricService) EnsureStarted ¶
func (s *MetricService) EnsureStarted() error
func (*MetricService) Info ¶
func (s *MetricService) Info() (*MetricsInfo, error)
func (*MetricService) Start ¶
func (s *MetricService) Start()
func (*MetricService) Stop ¶
func (s *MetricService) Stop()
func (*MetricService) ToggleEnabled ¶
func (s *MetricService) ToggleEnabled(isEnabled bool) error
type MetricsInfo ¶
type SQLiteMetricRepository ¶
type SQLiteMetricRepository struct {
// contains filtered or unexported fields
}
func NewSQLiteMetricRepository ¶
func NewSQLiteMetricRepository(db *sql.DB) *SQLiteMetricRepository
func (*SQLiteMetricRepository) Add ¶
func (r *SQLiteMetricRepository) Add(metric common.Metric) error
func (*SQLiteMetricRepository) Delete ¶
func (r *SQLiteMetricRepository) Delete(metrics []common.Metric) error
func (*SQLiteMetricRepository) Info ¶
func (r *SQLiteMetricRepository) Info() (*MetricsInfo, error)
func (*SQLiteMetricRepository) Poll ¶
func (r *SQLiteMetricRepository) Poll() ([]common.Metric, error)
func (*SQLiteMetricRepository) ToggleEnabled ¶
func (r *SQLiteMetricRepository) ToggleEnabled(enabled bool) error
Click to show internal directories.
Click to hide internal directories.