Add Purge method/interface to database system

Also, implement Purger interface in bbolt storage.
This commit is contained in:
Daniel 2020-09-24 15:02:51 +02:00
parent 362539692e
commit 82af986224
5 changed files with 158 additions and 3 deletions

View file

@ -36,3 +36,8 @@ type Maintainer interface {
type Batcher interface {
PutMany(shadowDelete bool) (batch chan<- record.Record, errs <-chan error)
}
// Purger defines the database storage API for backends that support the purge operation.
type Purger interface {
Purge(ctx context.Context, q *query.Query, local, internal, shadowDelete bool) (int, error)
}