selector

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvenDistributionSelector

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

EvenDistributionSelector provides even distribution across all vendor-credential-model combinations

func NewEvenDistributionSelector

func NewEvenDistributionSelector() *EvenDistributionSelector

NewEvenDistributionSelector creates a new even distribution selector

func (*EvenDistributionSelector) Select

Select evenly selects from all possible vendor-credential-model combinations

type RandomSelector

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

RandomSelector is a selector that randomly chooses vendors and models

func NewRandomSelector

func NewRandomSelector() *RandomSelector

NewRandomSelector creates a new random selector

func (*RandomSelector) Select

func (s *RandomSelector) Select(creds []config.Credential, models []config.VendorModel) (*VendorSelection, error)

Select randomly selects a vendor, model and its credential

type Selector

type Selector interface {
	Select(creds []config.Credential, models []config.VendorModel) (*VendorSelection, error)
}

Selector interface for different selection strategies

type VendorModelCombination

type VendorModelCombination struct {
	Vendor     string
	Model      string
	Credential config.Credential
}

VendorModelCombination represents a specific combination of credential and model

type VendorSelection

type VendorSelection struct {
	Vendor     string
	Model      string
	Credential config.Credential
}

VendorSelection stores the selected vendor, model and credential

Jump to

Keyboard shortcuts

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