refactoring to get master function, instead of passing master values directly

this will enable retrying later
This commit is contained in:
Chris Lu
2021-02-17 20:55:55 -08:00
parent dd9f3a0104
commit 6daa932f5c
20 changed files with 64 additions and 57 deletions

View File

@@ -72,7 +72,7 @@ func runBackup(cmd *Command, args []string) bool {
vid := needle.VolumeId(*s.volumeId)
// find volume location, replication, ttl info
lookup, err := operation.Lookup(*s.master, vid.String())
lookup, err := operation.Lookup(func()string{return *s.master}, vid.String())
if err != nil {
fmt.Printf("Error looking up volume %d: %v\n", vid, err)
return true