You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/blockscopy/main.go
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -42,20 +42,22 @@ type config struct {
42
42
copyPeriod time.Duration
43
43
enabledUsers flagext.StringSliceCSV
44
44
disabledUsers flagext.StringSliceCSV
45
+
dryRunbool
45
46
46
47
httpListenstring
47
48
}
48
49
49
50
func (c*config) RegisterFlags(f*flag.FlagSet) {
50
-
f.StringVar(&c.sourceBucket, "source-bucket", "", "Source GCS bucket with blocks")
51
-
f.StringVar(&c.destBucket, "destination-bucket", "", "Destination GCS bucket with blocks")
52
-
f.DurationVar(&c.minBlockDuration, "min-block-duration", 24*time.Hour, "If non-zero, ignore blocks that cover block range smaller than this")
51
+
f.StringVar(&c.sourceBucket, "source-bucket", "", "Source GCS bucket with blocks.")
52
+
f.StringVar(&c.destBucket, "destination-bucket", "", "Destination GCS bucket with blocks.")
53
+
f.DurationVar(&c.minBlockDuration, "min-block-duration", 24*time.Hour, "If non-zero, ignore blocks that cover block range smaller than this.")
53
54
f.IntVar(&c.tenantConcurrency, "tenant-concurrency", 5, "How many tenants to process at once.")
54
55
f.IntVar(&c.blocksConcurrency, "block-concurrency", 5, "How many blocks to copy at once per tenant.")
55
56
f.DurationVar(&c.copyPeriod, "copy-period", 0, "How often to repeat the copy. If set to 0, copy is done once, and program stops. Otherwise program keeps running and copying blocks until terminated.")
56
57
f.Var(&c.enabledUsers, "enabled-users", "If not empty, only blocks for these users are copied.")
57
58
f.Var(&c.disabledUsers, "disabled-users", "If not empty, blocks for these users are not copied.")
0 commit comments