options

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserRouterRequired     = errors.New("'user_router' block is required")
	ErrInvalidOutputFormat    = errors.New("value for 'output_format' is invalid")
	ErrOutputFormatOnlyForTSM = errors.New("'output_format' option is only valid for provider 'alb' and mechanism 'tsmerge'")
)

Functions

func NewErrInvalidALBOptions

func NewErrInvalidALBOptions(backendName string) error

NewErrInvalidALBOptions returns an invalid ALB Options error

Types

type InvalidALBOptionsError

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

InvalidALBOptionsError is an error type for invalid ALB Options

type Options

type Options struct {
	// MechanismName indicates the name of the load balancing mechanism
	MechanismName string `yaml:"mechanism,omitempty"`
	// Pool provides the list of backend names to be used by the load balancer
	Pool []string `yaml:"pool,omitempty"`
	// HealthyFloor is the minimum health check status value to be considered Available in the pool
	// -1 : all pool members are Available regardless of health check status
	//  0 (default) : pool members with status of unknown (0) or healthy (1) are Available
	//  1 : only pool members with status of healthy (1) are Available
	// unknown means the first hc hasn't returned yet,
	// or (more likely) HealthCheck Interval on target backend is not set
	HealthyFloor int `yaml:"healthy_floor,omitempty"`
	// OutputFormat accompanies the tsmerge Mechanism to indicate the provider output format
	// options include any valid time seres backend like prometheus, influxdb or clickhouse
	OutputFormat string `yaml:"output_format,omitempty"`
	// FGRStatusCodes provides an explicit list of status codes considered "good" when using
	// the First Good Response (fgr) methodology. By default, any code < 400 is good.
	FGRStatusCodes []int `yaml:"fgr_status_codes,omitempty"`
	// UserRouter provides options for the User Router mechanism
	UserRouter *ur.Options `yaml:"user_router,omitempty"`
	//
	// synthetic values
	FgrCodesLookup sets.Set[int] `yaml:"-"`
}

Options defines options for ALBs

func New

func New() *Options

New returns a New Options object with the default values

func (*Options) Clone

func (o *Options) Clone() *Options

Clone returns a perfect copy of the Options

func (*Options) Initialize

func (o *Options) Initialize(_ string) error

func (*Options) UnmarshalYAML

func (o *Options) UnmarshalYAML(unmarshal func(any) error) error

func (*Options) Validate

func (o *Options) Validate() (bool, error)

func (*Options) ValidatePool

func (o *Options) ValidatePool(backendName string, allBackends sets.Set[string]) error

Jump to

Keyboard shortcuts

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