2020-01-02 20:41:18 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package downtime
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2019-11-08 20:40:39 +00:00
|
|
|
"github.com/spacemonkeygo/monkit/v3"
|
2020-01-02 20:41:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
mon = monkit.Package()
|
|
|
|
)
|
|
|
|
|
2020-01-07 21:34:48 +00:00
|
|
|
// Config for the chore.
|
2020-01-02 20:41:18 +00:00
|
|
|
type Config struct {
|
2020-04-13 19:08:04 +01:00
|
|
|
DetectionInterval time.Duration `help:"how often to run the downtime detection chore." releaseDefault:"1h0s" devDefault:"30s"`
|
|
|
|
EstimationInterval time.Duration `help:"how often to run the downtime estimation chore" releaseDefault:"1h0s" devDefault:"30s"`
|
|
|
|
EstimationBatchSize int `help:"the downtime estimation chore should check this many offline nodes" releaseDefault:"1000" devDefault:"100"`
|
|
|
|
EstimationConcurrencyLimit int `help:"max number of concurrent connections in estimation chore" default:"10"`
|
2020-01-02 20:41:18 +00:00
|
|
|
}
|