mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
* Add toggle for state history backend and shells * Extract some shared logic and add tests
23 lines
463 B
Go
23 lines
463 B
Go
package historian
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/log"
|
|
"github.com/grafana/grafana/pkg/services/ngalert/models"
|
|
"github.com/grafana/grafana/pkg/services/ngalert/state"
|
|
)
|
|
|
|
type SqlBackend struct {
|
|
log log.Logger
|
|
}
|
|
|
|
func NewSqlBackend() *SqlBackend {
|
|
return &SqlBackend{
|
|
log: log.New("ngalert.state.historian"),
|
|
}
|
|
}
|
|
|
|
func (h *SqlBackend) RecordStatesAsync(ctx context.Context, _ *models.AlertRule, _ []state.StateTransition) {
|
|
}
|