Skip to content

Commit 29e195b

Browse files
committed
routing: add At() and Append() methods to
RTHostList
1 parent 22b369a commit 29e195b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/routing.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ func (l *RTHostList) Data() []*RTHost {
119119
return rs
120120
}
121121

122+
func (l *RTHostList) At(i int) *RTHost {
123+
return l.v.At(i).(*RTHost)
124+
}
125+
126+
func (l *RTHostList) Append(m *RTHostList) {
127+
l.v.AppendVector(m.v)
128+
}
129+
122130
func NewBRoutingTable(id string) (rt *BRoutingTable) {
123131
rt = new(BRoutingTable)
124132

0 commit comments

Comments
 (0)