route

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRouteLevel = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pair

type Pair struct {
	Symbol string
	Base   string
	Quote  string
}

type Route

type Route struct {
	Symbol  string `json:"symbol"`
	Asset   string `json:"asset"`
	Reverse bool   `json:"reverse,omitempty"`
}

type Routes

type Routes []*Route

func FindRoutes

func FindRoutes(pairs []*Pair, from, to string) (Routes, bool)

FindRoutes: BFS search routes, returning the shortest routes

func (Routes) String

func (routes Routes) String() string

Jump to

Keyboard shortcuts

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