mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Break dependency between state and image packages (#58381)
* Refactor state and manager to not depend directly on image interface * Move generic errors to models package * Move NotAvailableImageService to state as its only references are in state tests * Move NoopImageService to state package * Move mock to state package * Fix linter error * Fix comment styling * Fix a couple added references introduced by rebase * Empty commit to kick build
This commit is contained in:
@@ -25,3 +25,10 @@ type Historian interface {
|
||||
// RecordStates writes a number of state transitions for a given rule to state history.
|
||||
RecordStates(ctx context.Context, rule *models.AlertRule, states []StateTransition)
|
||||
}
|
||||
|
||||
// ImageCapturer captures images.
|
||||
//
|
||||
//go:generate mockgen -destination=image_mock.go -package=state github.com/grafana/grafana/pkg/services/ngalert/state ImageCapturer
|
||||
type ImageCapturer interface {
|
||||
NewImage(ctx context.Context, r *models.AlertRule) (*models.Image, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user