Documentation ¶
Index ¶
- type CleanupServiceImpl
- type RepositoryImpl
- func (r *RepositoryImpl) Delete(ctx context.Context, params *annotations.DeleteParams) error
- func (r *RepositoryImpl) Find(ctx context.Context, query *annotations.ItemQuery) ([]*annotations.ItemDTO, error)
- func (r *RepositoryImpl) FindTags(ctx context.Context, query *annotations.TagsQuery) (annotations.FindTagsResult, error)
- func (r *RepositoryImpl) Save(ctx context.Context, item *annotations.Item) error
- func (r *RepositoryImpl) Update(ctx context.Context, item *annotations.Item) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupServiceImpl ¶
type CleanupServiceImpl struct {
// contains filtered or unexported fields
}
CleanupServiceImpl is responsible for cleaning old annotations.
func ProvideCleanupService ¶
func ProvideCleanupService(db db.DB, cfg *setting.Cfg) *CleanupServiceImpl
func (*CleanupServiceImpl) Run ¶
Run deletes old annotations created by alert rules, API requests and human made in the UI. It subsequently deletes orphaned rows from the annotation_tag table. Cleanup actions are performed in batches so that no query takes too long to complete.
Returns the number of annotation and annotation_tag rows deleted. If an error occurs, it returns the number of rows affected so far.
type RepositoryImpl ¶
type RepositoryImpl struct {
// contains filtered or unexported fields
}
func ProvideService ¶
func (*RepositoryImpl) Delete ¶
func (r *RepositoryImpl) Delete(ctx context.Context, params *annotations.DeleteParams) error
func (*RepositoryImpl) Find ¶
func (r *RepositoryImpl) Find(ctx context.Context, query *annotations.ItemQuery) ([]*annotations.ItemDTO, error)
func (*RepositoryImpl) FindTags ¶
func (r *RepositoryImpl) FindTags(ctx context.Context, query *annotations.TagsQuery) (annotations.FindTagsResult, error)
func (*RepositoryImpl) Save ¶
func (r *RepositoryImpl) Save(ctx context.Context, item *annotations.Item) error
func (*RepositoryImpl) Update ¶
func (r *RepositoryImpl) Update(ctx context.Context, item *annotations.Item) error
Click to show internal directories.
Click to hide internal directories.