podscaler

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module returns the fx options for horizontal pod scaler in the main app.

func NewPodScalerOptions

func NewPodScalerOptions(
	podScalerProto *policylangv1.PodScaler,
	componentStackID string,
	policyReadAPI iface.Policy,
) (fx.Option, string, error)

NewPodScalerOptions creates fx options for HorizontalPodScaler and also returns the agent group name associated with it.

func NewScaleActuatorAndOptions

func NewScaleActuatorAndOptions(
	scaleActuatorProto *policylangv1.PodScaler_ScaleActuator,
	componentID string,
	policyReadAPI iface.Policy,
	agentGroup string,
) (runtime.Component, fx.Option, error)

NewScaleActuatorAndOptions creates scale actuator and its fx options.

func NewScaleReporterAndOptions

func NewScaleReporterAndOptions(
	_ *policylangv1.PodScaler_ScaleReporter,
	componentID string,
	policyReadAPI iface.Policy,
	agentGroup string,
) (runtime.Component, fx.Option, error)

NewScaleReporterAndOptions returns a new ScaleReporter and its fx options.

Types

type ScaleActuator

type ScaleActuator struct {
	// contains filtered or unexported fields
}

ScaleActuator struct.

func (*ScaleActuator) DynamicConfigUpdate

func (sa *ScaleActuator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)

DynamicConfigUpdate finds the dynamic config and syncs the decision to agent.

func (*ScaleActuator) Execute

func (sa *ScaleActuator) Execute(inPortReadings runtime.PortToReading, tickInfo runtime.TickInfo) (runtime.PortToReading, error)

Execute implements runtime.Component.Execute.

func (*ScaleActuator) IsActuator added in v1.1.0

func (*ScaleActuator) IsActuator() bool

IsActuator implements runtime.Component.

func (*ScaleActuator) Name

func (*ScaleActuator) Name() string

Name implements runtime.Component.

func (*ScaleActuator) ShortDescription

func (sa *ScaleActuator) ShortDescription() string

ShortDescription implements runtime.Component.

func (*ScaleActuator) Type

Type implements runtime.Component.

type ScaleReporter

type ScaleReporter struct {
	// contains filtered or unexported fields
}

ScaleReporter struct.

func (*ScaleReporter) DynamicConfigUpdate

func (sr *ScaleReporter) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)

DynamicConfigUpdate is a no-op for this component.

func (*ScaleReporter) Execute

func (sr *ScaleReporter) Execute(inPortReadings runtime.PortToReading, tickInfo runtime.TickInfo) (runtime.PortToReading, error)

Execute implements runtime.Component.

func (*ScaleReporter) IsActuator added in v1.1.0

func (*ScaleReporter) IsActuator() bool

IsActuator implements runtime.Component.

func (*ScaleReporter) Name

func (*ScaleReporter) Name() string

Name implements runtime.Component.Name.

func (*ScaleReporter) ShortDescription

func (sr *ScaleReporter) ShortDescription() string

ShortDescription implements runtime.Component.ShortDescription.

func (*ScaleReporter) Type

func (sr *ScaleReporter) Type() runtime.ComponentType

Type implements runtime.Component.Type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL