Documentation
¶
Index ¶
- type Autoscaler
- type Client
- type Handler
- type Scaler
- type ScalerFunc
- func (s *ScalerFunc) CurrentReplicas(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 Autoscaler ¶
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 Scaler ¶
type Scaler interface { Scale(apiName string, request int32) error GetInFlightRequests(apiName string, window time.Duration) (*float64, error) GetAutoscalingSpec(apiName string) (*userconfig.Autoscaling, error) CurrentReplicas(apiName string) (int32, error) }
func NewRealtimeScaler ¶
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) CurrentReplicasFunc func(apiName string) (int32, error) }
func (*ScalerFunc) CurrentReplicas ¶
func (s *ScalerFunc) CurrentReplicas(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.