optimizer

package
v0.0.0-...-dbf2142 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpeedTest

func SpeedTest(ctx context.Context, node *model.Node) model.Latencies

SpeedTest ping all nodes and measure the latency

Types

type Optimizer

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

func NewOptimizer

func NewOptimizer(node *model.Node) (*Optimizer, error)

func (*Optimizer) Handle

func (o *Optimizer) Handle(ctx context.Context) <-chan error

func (*Optimizer) Info

func (o *Optimizer) Info() string

func (*Optimizer) OptimizedRoutes

func (o *Optimizer) OptimizedRoutes(entry string, exit string) []string

func (*Optimizer) RouteInfo

func (o *Optimizer) RouteInfo(from string, to string) string

func (*Optimizer) RunSpeedTest

func (o *Optimizer) RunSpeedTest(ctx context.Context)

Jump to

Keyboard shortcuts

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