forked from TrueCloudLab/restic
Add progress report for loading blobs
This commit is contained in:
parent
58cded6b75
commit
a59b0ec1f6
5 changed files with 76 additions and 20 deletions
10
server.go
10
server.go
|
@ -422,6 +422,16 @@ func (s Server) Stats() (ServerStats, error) {
|
|||
return ServerStats{Blobs: uint(blobs.Len()), Trees: uint(trees)}, err
|
||||
}
|
||||
|
||||
// Count counts the number of objects of type t in the backend.
|
||||
func (s Server) Count(t backend.Type) (int, error) {
|
||||
l, err := s.be.List(t)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return len(l), nil
|
||||
}
|
||||
|
||||
// Proxy methods to backend
|
||||
|
||||
func (s Server) List(t backend.Type) (backend.IDs, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue