Newer
Older
import bnet "github.com/bio-routing/bio-rd/net"
// StaticPath represents a static path of a route
type StaticPath struct {
// Select returns negative if s < t, 0 if paths are equal, positive if s > t
func (s *StaticPath) Select(t *StaticPath) int8 {
// Equal returns true if s and t are euqal
func (s *StaticPath) Equal(t *StaticPath) bool {
return s.NextHop == t.NextHop
}
// ECMP determines if path s and t are equal in terms of ECMP
func (s *StaticPath) ECMP(t *StaticPath) bool {
return true