add stream retry middleware for signalling (#1503)
This commit is contained in:
+14
-1
@@ -61,7 +61,7 @@ type Config struct {
|
||||
KeyFile string `yaml:"key_file,omitempty"`
|
||||
Keys map[string]string `yaml:"keys,omitempty"`
|
||||
Region string `yaml:"region,omitempty"`
|
||||
UsePSRPCSignal bool `yaml:"use_psrpc_signal,omitempty"`
|
||||
SignalRelay SignalRelayConfig `yaml:"signal_relay,omitempty"`
|
||||
// LogLevel is deprecated
|
||||
LogLevel string `yaml:"log_level,omitempty"`
|
||||
Logging LoggingConfig `yaml:"logging,omitempty"`
|
||||
@@ -228,6 +228,13 @@ type NodeSelectorConfig struct {
|
||||
Regions []RegionConfig `yaml:"regions"`
|
||||
}
|
||||
|
||||
type SignalRelayConfig struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
MaxAttempts int `yaml:"max_attempts"`
|
||||
Timeout time.Duration `yaml:"timeout"`
|
||||
Backoff time.Duration `yaml:"backoff"`
|
||||
}
|
||||
|
||||
// RegionConfig lists available regions and their latitude/longitude, so the selector would prefer
|
||||
// regions that are closer
|
||||
type RegionConfig struct {
|
||||
@@ -397,6 +404,12 @@ func NewConfig(confString string, strictMode bool, c *cli.Context, baseFlags []c
|
||||
SysloadLimit: 0.9,
|
||||
CPULoadLimit: 0.9,
|
||||
},
|
||||
SignalRelay: SignalRelayConfig{
|
||||
Enabled: false,
|
||||
MaxAttempts: 3,
|
||||
Timeout: 500 * time.Millisecond,
|
||||
Backoff: 500 * time.Millisecond,
|
||||
},
|
||||
Keys: map[string]string{},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user