component/snapshots: Create new component
This commit creates a new 'snapshots' component that is intended to manage snapshots and backups.
This commit is contained in:
parent
ea56ff4aac
commit
f58920baf4
7 changed files with 89 additions and 63 deletions
|
|
@ -14,7 +14,7 @@ func (dis *Distillery) ShouldPrune(modtime time.Time) bool {
|
|||
|
||||
// PruneBackups prunes all backups older than the maximum backup age
|
||||
func (dis *Distillery) PruneBackups(io stream.IOStream) error {
|
||||
sPath := dis.SnapshotsArchivePath()
|
||||
sPath := dis.Snapshots().ArchivePath()
|
||||
|
||||
// list all the files
|
||||
entries, err := dis.Core.Environment.ReadDir(sPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue