Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package routingtable
import (
"fmt"
"github.com/bio-routing/bio-rd/net"
"github.com/bio-routing/bio-rd/route"
)
type RemovePathParams struct {
Pfx net.Prefix
Path *route.Path
}
type RTMockClient struct {
removePathParams RemovePathParams
}
func NewRTMockClient() *RTMockClient {
return &RTMockClient{}
}
func (m *RTMockClient) GetRemovePathParams() RemovePathParams {
return m.removePathParams
}
func (m *RTMockClient) AddPath(pfx net.Prefix, p *route.Path) error {
return nil
}
func (m *RTMockClient) UpdateNewClient(client RouteTableClient) error {
return fmt.Errorf("Not implemented")
}
func (m *RTMockClient) Register(RouteTableClient) {
return
}
func (m *RTMockClient) RegisterWithOptions(RouteTableClient, ClientOptions) {
return
}
func (m *RTMockClient) Unregister(RouteTableClient) {
return
}
// RemovePath removes the path for prefix `pfx`
func (m *RTMockClient) RemovePath(pfx net.Prefix, p *route.Path) bool {
m.removePathParams.Pfx = pfx
m.removePathParams.Path = p
return true
}
func (m *RTMockClient) RouteCount() int64 {
return 0
}