single

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

SingleProfileHandler

Type: single-profile-handler

[!NOTE] This plugin is enabled by default when exactly one scheduling profile is defined and no profile handler is configured. You do not need to explicitly declare it in your configuration.

Selects the single configured scheduling profile as the primary profile for every request.

What it does

Runs the one configured scheduling profile and returns its result as the primary scheduling outcome.

Configuration

Parameters

None.

Documentation

Index

Constants

View Source
const (
	SingleProfileHandlerType = "single-profile-handler"
)

Variables

This section is empty.

Functions

func SingleProfileHandlerFactory

func SingleProfileHandlerFactory(name string, _ *json.Decoder, _ fwkplugin.Handle) (fwkplugin.Plugin, error)

SingleProfileHandlerFactory defines the factory function for SingleProfileHandler.

Types

type SingleProfileHandler

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

SingleProfileHandler handles a single profile which is always the primary profile.

func NewSingleProfileHandler

func NewSingleProfileHandler() *SingleProfileHandler

NewSingleProfileHandler initializes a new SingleProfileHandler and returns its pointer.

func (*SingleProfileHandler) Pick

Pick selects the SchedulingProfiles to run from the list of candidate profiles, while taking into consideration the request properties and the previously executed cycles along with their results.

func (*SingleProfileHandler) ProcessResults

ProcessResults handles the outcome of the profile runs after all profiles ran. It may aggregate results, log test profile outputs, or apply custom logic. It specifies in the SchedulingResult the key of the primary profile that should be used to get the request selected destination. When a profile run fails, its result in the profileResults map is nil.

func (*SingleProfileHandler) TypedName

func (h *SingleProfileHandler) TypedName() fwkplugin.TypedName

TypedName returns the type and name tuple of this plugin instance.

func (*SingleProfileHandler) WithName

WithName sets the name of the profile handler.

Jump to

Keyboard shortcuts

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