{backup,snapshot}: Log and display in control
This commit is contained in:
parent
3b112f1b8e
commit
630da9e12f
17 changed files with 294 additions and 44 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/models"
|
||||
"github.com/tkw1536/goprogram/stream"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
|
@ -20,6 +21,9 @@ type WissKIInfo struct {
|
|||
Running bool
|
||||
LastRebuild time.Time
|
||||
|
||||
// List of backups made
|
||||
Snapshots []models.Snapshot
|
||||
|
||||
// WissKI content information
|
||||
Prefixes []string // list of prefixes
|
||||
Pathbuilders map[string]string // all the pathbuilders
|
||||
|
|
@ -59,6 +63,10 @@ func (wisski *WissKI) Info(quick bool) (info WissKIInfo, err error) {
|
|||
info.Prefixes, _ = wisski.Prefixes()
|
||||
return nil
|
||||
})
|
||||
group.Go(func() error {
|
||||
info.Snapshots, _ = wisski.Snapshots()
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
err = group.Wait()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue