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) SaveMany(ctx context.Context, items []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, features featuremgmt.FeatureToggles) *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 ProvideService(db db.DB, cfg *setting.Cfg, features featuremgmt.FeatureToggles, tagService tag.Service) *RepositoryImpl
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) SaveMany ¶
func (r *RepositoryImpl) SaveMany(ctx context.Context, items []annotations.Item) error
SaveMany inserts multiple annotations at once. It does not return IDs associated with created annotations. If you need this functionality, use the single-item Save instead.
func (*RepositoryImpl) Update ¶
func (r *RepositoryImpl) Update(ctx context.Context, item *annotations.Item) error
Click to show internal directories.
Click to hide internal directories.