diff options
Diffstat (limited to 'cmd/sigsum_log_go/main.go')
-rw-r--r-- | cmd/sigsum_log_go/main.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/sigsum_log_go/main.go b/cmd/sigsum_log_go/main.go index 786504d..13bb54d 100644 --- a/cmd/sigsum_log_go/main.go +++ b/cmd/sigsum_log_go/main.go @@ -37,6 +37,8 @@ var ( witnesses = flag.String("witnesses", "", "comma-separated list of trusted witness verification keys in hex") maxRange = flag.Int64("max_range", 10, "maximum number of entries that can be retrived in a single request") interval = flag.Duration("interval", time.Second*30, "interval used to rotate the log's cosigned STH") + shardStart = flag.Int64("shard_interval_start", 0, "start of shard interval since the UNIX epoch in seconds") + shardEnd = flag.Int64("shard_interval_end", 0, "end of shard interval since the UNIX epoch in seconds") gitCommit = "unknown" ) @@ -102,6 +104,14 @@ func setupInstanceFromFlags() (*sigsum.Instance, error) { i.MaxRange = *maxRange i.Deadline = *deadline i.Interval = *interval + i.ShardStart = uint64(*shardStart) + if *shardStart < 0 { + return nil, fmt.Errorf("shard start must be larger than zero") + } + i.ShardEnd = uint64(*shardEnd) + if *shardEnd < *shardStart { + return nil, fmt.Errorf("shard end must be larger than shard start") + } i.Witnesses, err = newWitnessMap(*witnesses) if err != nil { return nil, fmt.Errorf("newWitnessMap: %v", err) |