MCPcopy
hub / github.com/cortexlabs/cortex / ScalerFunc

Struct ScalerFunc

pkg/autoscaler/scaler_func.go:25–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23)
24
25type ScalerFunc struct {
26 ScaleFunc func(apiName string, request int32) error
27 GetInFlightRequestsFunc func(apiName string, window time.Duration) (*float64, error)
28 GetAutoscalingSpecFunc func(apiName string) (*userconfig.Autoscaling, error)
29 CurrentRequestedReplicasFunc func(apiName string) (int32, error)
30}
31
32func (s *ScalerFunc) Scale(apiName string, request int32) error {
33 if s.ScaleFunc == nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected