summaryrefslogtreecommitdiffhomepage
path: root/table/table.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2017-02-13 06:30:58 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-02-15 00:10:15 +0900
commit52356c26f821fdebb3fdf943a1b898a2d1b4d0db (patch)
tree0ebe5f222851168489f9118eeb77f71547d5ccb6 /table/table.go
parentf276279bf6d90b3f5940bc63780cc3483e9d734e (diff)
server: add a current option to WatchBestPath()
also, use it for zebra integration Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/table.go')
-rw-r--r--table/table.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/table/table.go b/table/table.go
index 08637522..c3b48812 100644
--- a/table/table.go
+++ b/table/table.go
@@ -303,6 +303,17 @@ func (t *Table) Bests(id string) []*Path {
return paths
}
+func (t *Table) MultiBests(id string) [][]*Path {
+ paths := make([][]*Path, 0, len(t.destinations))
+ for _, dst := range t.destinations {
+ path := dst.GetMultiBestPath(id)
+ if path != nil {
+ paths = append(paths, path)
+ }
+ }
+ return paths
+}
+
func (t *Table) GetKnownPathList(id string) []*Path {
paths := make([]*Path, 0, len(t.destinations))
for _, dst := range t.destinations {