feat: backoff config initial func

This commit is contained in:
Mmx
2024-09-24 23:18:42 +08:00
parent f82deb2870
commit e1ff68cfc2
3 changed files with 36 additions and 2 deletions

View File

@@ -8,8 +8,19 @@ import (
type (
GuardianConf struct {
Enable bool `json:"enable" yaml:"enable"`
Duration uint `json:"duration" yaml:"duration"`
Enable bool `json:"enable" yaml:"enable"`
Duration uint `json:"duration" yaml:"duration"`
Backoff BackoffConf `json:"backoff" yaml:"backoff"`
}
BackoffConf struct {
MaxRetries uint `json:"max_retries" yaml:"max_retries"`
InitialDuration uint `json:"initial_duration" yaml:"initial_duration"`
MaxDuration uint `json:"max_duration" yaml:"max_duration"`
ExponentFactor uint `json:"exponent_factor" yaml:"exponent_factor"`
InterConstFactor uint `json:"inter_const_factor" yaml:"inter_const_factor"`
OuterConstFactor uint `json:"outer_const_factor" yaml:"outer_const_factor"`
}
BasicConf struct {