Documentation
¶
Index ¶
- type AsyncScaler
- func (s *AsyncScaler) CurrentRequestedReplicas(apiName string) (int32, error)
- func (s *AsyncScaler) GetAutoscalingSpec(apiName string) (*userconfig.Autoscaling, error)
- func (s *AsyncScaler) GetInFlightRequests(apiName string, window time.Duration) (*float64, error)
- func (s *AsyncScaler) Scale(apiName string, request int32) error
- type Autoscaler
- type Client
- type Handler
- type RealtimeScaler
- func (s *RealtimeScaler) CurrentRequestedReplicas(apiName string) (int32, error)
- func (s *RealtimeScaler) GetAutoscalingSpec(apiName string) (*userconfig.Autoscaling, error)
- func (s *RealtimeScaler) GetInFlightRequests(apiName string, window time.Duration) (*float64, error)
- func (s *RealtimeScaler) Scale(apiName string, request int32) error
- type Scaler
- type ScalerFunc
- func (s *ScalerFunc) CurrentRequestedReplicas(apiName string) (int32, error)
- func (s *ScalerFunc) GetAutoscalingSpec(apiName string) (*userconfig.Autoscaling, error)
- func (s *ScalerFunc) GetInFlightRequests(apiName string, window time.Duration) (*float64, error)
- func (s *ScalerFunc) Scale(apiName string, request int32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncScaler ¶ added in v0.39.0
type AsyncScaler struct {
// contains filtered or unexported fields
}
func NewAsyncScaler ¶
func NewAsyncScaler(k8sClient *k8s.Client, promClient promv1.API) *AsyncScaler
func (*AsyncScaler) CurrentRequestedReplicas ¶ added in v0.39.0
func (s *AsyncScaler) CurrentRequestedReplicas(apiName string) (int32, error)
func (*AsyncScaler) GetAutoscalingSpec ¶ added in v0.39.0
func (s *AsyncScaler) GetAutoscalingSpec(apiName string) (*userconfig.Autoscaling, error)
func (*AsyncScaler) GetInFlightRequests ¶ added in v0.39.0
type Autoscaler ¶
type Autoscaler struct {
// contains filtered or unexported fields
}
func New ¶
func New(logger *zap.SugaredLogger) *Autoscaler
func (*Autoscaler) AddAPI ¶
func (a *Autoscaler) AddAPI(api userconfig.Resource) error
func (*Autoscaler) AddScaler ¶
func (a *Autoscaler) AddScaler(scaler Scaler, kind userconfig.Kind)
func (*Autoscaler) Awaken ¶
func (a *Autoscaler) Awaken(api userconfig.Resource) error
func (*Autoscaler) RemoveAPI ¶
func (a *Autoscaler) RemoveAPI(api userconfig.Resource)
func (*Autoscaler) Stop ¶
func (a *Autoscaler) Stop()
type Client ¶
type Client interface {
Awaken(api userconfig.Resource) error
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(autoscaler *Autoscaler) *Handler
type RealtimeScaler ¶ added in v0.39.0
type RealtimeScaler struct {
// contains filtered or unexported fields
}
func NewRealtimeScaler ¶
func NewRealtimeScaler(k8sClient *k8s.Client, promClient promv1.API, logger *zap.SugaredLogger) *RealtimeScaler
func (*RealtimeScaler) CurrentRequestedReplicas ¶ added in v0.39.0
func (s *RealtimeScaler) CurrentRequestedReplicas(apiName string) (int32, error)
func (*RealtimeScaler) GetAutoscalingSpec ¶ added in v0.39.0
func (s *RealtimeScaler) GetAutoscalingSpec(apiName string) (*userconfig.Autoscaling, error)
func (*RealtimeScaler) GetInFlightRequests ¶ added in v0.39.0
type ScalerFunc ¶
type ScalerFunc struct { ScaleFunc func(apiName string, request int32) error GetInFlightRequestsFunc func(apiName string, window time.Duration) (*float64, error) GetAutoscalingSpecFunc func(apiName string) (*userconfig.Autoscaling, error) CurrentRequestedReplicasFunc func(apiName string) (int32, error) }
func (*ScalerFunc) CurrentRequestedReplicas ¶ added in v0.39.0
func (s *ScalerFunc) CurrentRequestedReplicas(apiName string) (int32, error)
func (*ScalerFunc) GetAutoscalingSpec ¶
func (s *ScalerFunc) GetAutoscalingSpec(apiName string) (*userconfig.Autoscaling, error)
func (*ScalerFunc) GetInFlightRequests ¶
Click to show internal directories.
Click to hide internal directories.