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