mirror of
https://github.com/safing/portbase
synced 2025-09-09 22:05:49 +00:00
Make shadow deletes conditional
Also, Move maintenance to separate interface.
This commit is contained in:
parent
c479430d46
commit
5bb73a7b4c
9 changed files with 83 additions and 45 deletions
|
@ -18,13 +18,17 @@ type Interface interface {
|
|||
|
||||
ReadOnly() bool
|
||||
Injected() bool
|
||||
Shutdown() error
|
||||
}
|
||||
|
||||
// Maintenance defines the database storage API for backends that requ
|
||||
type Maintenance interface {
|
||||
Maintain(ctx context.Context) error
|
||||
MaintainThorough(ctx context.Context) error
|
||||
MaintainRecordStates(ctx context.Context, purgeDeletedBefore time.Time) error
|
||||
Shutdown() error
|
||||
}
|
||||
|
||||
// Batcher defines the database storage API for backends that support batch operations.
|
||||
type Batcher interface {
|
||||
PutMany() (batch chan<- record.Record, errs <-chan error)
|
||||
PutMany(shadowDelete bool) (batch chan<- record.Record, errs <-chan error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue