path

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choose

func Choose(
	ctx context.Context,
	conn daemon.Connector,
	remote addr.IA,
	opts ...Option,
) (snet.Path, error)

Choose selects a path to the remote.

func Filter

func Filter(seq string, paths []snet.Path) ([]snet.Path, error)

Filter filters out paths according to a sequence.

func Sort

func Sort(paths []snet.Path)

Sort sorts paths according to hops and interfaces.

Types

type ColorScheme

type ColorScheme struct {
	Header *color.Color
	Keys   *color.Color
	Values *color.Color
	Link   *color.Color
	Intf   *color.Color
	Good   *color.Color
	Bad    *color.Color
}

ColorScheme allows customizing the path coloring.

func DefaultColorScheme

func DefaultColorScheme(disable bool) ColorScheme

func (ColorScheme) KeyValue

func (cs ColorScheme) KeyValue(k, v string) string

func (ColorScheme) KeyValues

func (cs ColorScheme) KeyValues(kv ...string) []string

func (ColorScheme) Path

func (cs ColorScheme) Path(path snet.Path) string

type Option

type Option func(o *options)

func WithColorScheme

func WithColorScheme(cs ColorScheme) Option

func WithEPIC

func WithEPIC(epic bool) Option

func WithInteractive

func WithInteractive(interactive bool) Option

func WithProbing

func WithProbing(cfg *ProbeConfig) Option

func WithRefresh

func WithRefresh(refresh bool) Option

func WithSequence

func WithSequence(seq string) Option

type ProbeConfig

type ProbeConfig struct {
	LocalIA    addr.IA
	LocalIP    net.IP
	Dispatcher string

	// Metrics injected into Prober.
	SCIONPacketConnMetrics snet.SCIONPacketConnMetrics
}

Jump to

Keyboard shortcuts

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