forked from TrueCloudLab/restic
Fix comments
This commit is contained in:
parent
d9b5832034
commit
5fc1583acc
2 changed files with 5 additions and 5 deletions
|
@ -55,7 +55,7 @@ func NewArchiver(repo *repo.Repository) *Archiver {
|
||||||
return arch
|
return arch
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save stores a blob read from rd in the server.
|
// Save stores a blob read from rd in the repository.
|
||||||
func (arch *Archiver) Save(t pack.BlobType, id backend.ID, length uint, rd io.Reader) error {
|
func (arch *Archiver) Save(t pack.BlobType, id backend.ID, length uint, rd io.Reader) error {
|
||||||
debug.Log("Archiver.Save", "Save(%v, %v)\n", t, id.Str())
|
debug.Log("Archiver.Save", "Save(%v, %v)\n", t, id.Str())
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ func (arch *Archiver) Save(t pack.BlobType, id backend.ID, length uint, rd io.Re
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SaveTreeJSON stores a tree in the server.
|
// SaveTreeJSON stores a tree in the repository.
|
||||||
func (arch *Archiver) SaveTreeJSON(item interface{}) (backend.ID, error) {
|
func (arch *Archiver) SaveTreeJSON(item interface{}) (backend.ID, error) {
|
||||||
data, err := json.Marshal(item)
|
data, err := json.Marshal(item)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -631,7 +631,7 @@ func (arch *Archiver) Snapshot(p *Progress, paths []string, parentID backend.ID)
|
||||||
sn.id = id
|
sn.id = id
|
||||||
debug.Log("Archiver.Snapshot", "saved snapshot %v", id.Str())
|
debug.Log("Archiver.Snapshot", "saved snapshot %v", id.Str())
|
||||||
|
|
||||||
// flush server
|
// flush repository
|
||||||
err = arch.repo.Flush()
|
err = arch.repo.Flush()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
|
4
cache.go
4
cache.go
|
@ -13,7 +13,7 @@ import (
|
||||||
"github.com/restic/restic/repo"
|
"github.com/restic/restic/repo"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Cache is used to locally cache items from a server.
|
// Cache is used to locally cache items from a repository.
|
||||||
type Cache struct {
|
type Cache struct {
|
||||||
base string
|
base string
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ func (c *Cache) purge(t backend.Type, subtype string, id backend.ID) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear removes information from the cache that isn't present in the server any more.
|
// Clear removes information from the cache that isn't present in the repository any more.
|
||||||
func (c *Cache) Clear(repo *repo.Repository) error {
|
func (c *Cache) Clear(repo *repo.Repository) error {
|
||||||
list, err := c.list(backend.Snapshot)
|
list, err := c.list(backend.Snapshot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue