mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* fn: New timeout for LB Placer Previously, LB Placers worked hard as long as client contexts allowed for. Adding a Placer config setting to bound this by 360 seconds by default. The new timeout is not accounted during actual function execution and only applies to the amount of wait time in Placers when the call is not being executed.
22 lines
509 B
Go
22 lines
509 B
Go
package runnerpool
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Common config for placers.
|
|
type PlacerConfig struct {
|
|
// After all runners in the runner list is tried, apply a delay before retrying.
|
|
RetryAllDelay time.Duration `json:"retry_all_delay"`
|
|
|
|
// Maximum amount of time a placer can hold a request during runner attempts
|
|
PlacerTimeout time.Duration `json:"placer_timeout"`
|
|
}
|
|
|
|
func NewPlacerConfig() PlacerConfig {
|
|
return PlacerConfig{
|
|
RetryAllDelay: 10 * time.Millisecond,
|
|
PlacerTimeout: 360 * time.Second,
|
|
}
|
|
}
|