utils

package
v0.0.0-...-82932d6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_HEALTH_CHECK_INTERVAL_IN_SEC int = 20
View Source
const DEFAULT_MAX_RETRIES int = 3

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                     int      `yaml:"lb_port"`
	Backends                 []string `yaml:"backends"`
	Strategy                 string   `yaml:"strategy"`
	HealthCheckIntervalInSec int      `yaml:"health_check_interval_in_sec"`
	MaxRetries               int      `yaml:"max_retries"`
}

func GetLBConfig

func GetLBConfig() (*Config, error)

type LBStrategy

type LBStrategy int
const (
	RoundRobin LBStrategy = iota
	LeastConnected
)

func GetLBStrategy

func GetLBStrategy(strategy string) LBStrategy

Jump to

Keyboard shortcuts

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