query

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByLastUpdate

type ByLastUpdate Results

ByLastUpdate implements the sort.Interface to sort results by LastUpdate time stamp.

func (ByLastUpdate) Len

func (r ByLastUpdate) Len() int

func (ByLastUpdate) Less

func (r ByLastUpdate) Less(i, j int) bool

func (ByLastUpdate) Swap

func (r ByLastUpdate) Swap(i, j int)

type IntfSpec

type IntfSpec struct {
	IA   addr.IA
	IfID iface.ID
}

type Params

type Params struct {
	SegIDs     [][]byte
	SegTypes   []seg.Type
	HPGroupIDs []uint64
	Intfs      []*IntfSpec
	StartsAt   []addr.IA
	EndsAt     []addr.IA
}

type Result

type Result struct {
	Seg        *seg.PathSegment
	LastUpdate time.Time
	HPGroupIDs []uint64
	Type       seg.Type
}

type Results

type Results []*Result

Results is a type for convenience methods on a slice of Results.

func (Results) Len

func (r Results) Len() int

Len returns the number of results.

func (Results) Less

func (r Results) Less(i, j int) bool

Less returns if seg[i] is less than seg[j] based on start_isd_as > end_isd_as > length > id

func (Results) SegMetas

func (r Results) SegMetas() []*seg.Meta

SegMetas returns the segments in a seg.Meta slice, i.e. returns the segments with their PathSegTypes.

func (Results) Segs

func (r Results) Segs() seg.Segments

Segs returns the segments in the Results slice.

func (Results) Swap

func (r Results) Swap(i, j int)

Swap swaps the two elements of Results

Jump to

Keyboard shortcuts

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