flag.IntVar(
&replications,
"replications",
- 3,
+ 0,
"Number of replications to write to the destination.")
flag.StringVar(
return
}
+ // Get default replications value from destination, if it is not already provided
+ if replications == 0 {
+ value, err := arvDst.Discovery("defaultCollectionReplication")
+ if err == nil {
+ replications = int(value.(float64))
+ } else {
+ replications = 2
+ }
+ }
+
// if srcKeepServicesJSON is provided, use it to load services; else, use DiscoverKeepServers
if srcKeepServicesJSON == "" {
kcSrc, err = keepclient.MakeKeepClient(&arvSrc)