2019-04-24 21:52:08 +00:00
|
|
|
package schema
|
|
|
|
|
2022-03-02 06:40:26 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2019-04-24 21:52:08 +00:00
|
|
|
// RegulationConfiguration represents the configuration related to regulation.
|
|
|
|
type RegulationConfiguration struct {
|
2022-03-02 06:40:26 +00:00
|
|
|
MaxRetries int `koanf:"max_retries"`
|
|
|
|
FindTime time.Duration `koanf:"find_time,weak"`
|
|
|
|
BanTime time.Duration `koanf:"ban_time,weak"`
|
2020-04-05 12:37:21 +00:00
|
|
|
}
|
|
|
|
|
2020-04-20 21:03:38 +00:00
|
|
|
// DefaultRegulationConfiguration represents default configuration parameters for the regulator.
|
2020-04-05 12:37:21 +00:00
|
|
|
var DefaultRegulationConfiguration = RegulationConfiguration{
|
|
|
|
MaxRetries: 3,
|
2022-03-02 06:40:26 +00:00
|
|
|
FindTime: time.Minute * 2,
|
|
|
|
BanTime: time.Minute * 5,
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|