mirror of
https://github.com/openfaas/faas.git
synced 2025-06-10 09:16:48 +00:00
- extracting this package means it can be used in other components such as the asynchronous nats-queue-worker which may need to invoke functions which are scaled down to zero replicas. Ref: https://github.com/openfaas/nats-queue-worker/issues/32 Tested on Docker Swarm for scaling up, already scaled and not found error. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
21 lines
505 B
Go
21 lines
505 B
Go
package scaling
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// ScalingConfig for scaling behaviours
|
|
type ScalingConfig struct {
|
|
// MaxPollCount attempts to query a function before giving up
|
|
MaxPollCount uint
|
|
|
|
// FunctionPollInterval delay or interval between polling a function's readiness status
|
|
FunctionPollInterval time.Duration
|
|
|
|
// CacheExpiry life-time for a cache entry before considering invalid
|
|
CacheExpiry time.Duration
|
|
|
|
// ServiceQuery queries available/ready replicas for function
|
|
ServiceQuery ServiceQuery
|
|
}
|