summaryrefslogtreecommitdiffhomepage
path: root/client/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go24
1 files changed, 15 insertions, 9 deletions
diff --git a/client/client.go b/client/client.go
index fea22e5d..211e55ef 100644
--- a/client/client.go
+++ b/client/client.go
@@ -912,10 +912,13 @@ func (c *MonitorRIBClient) Recv() (*table.Destination, error) {
return d.ToNativeDestination()
}
-func (cli *Client) MonitorRIB(family bgp.RouteFamily) (*MonitorRIBClient, error) {
- stream, err := cli.cli.MonitorRib(context.Background(), &api.Table{
- Type: api.Resource_GLOBAL,
- Family: uint32(family),
+func (cli *Client) MonitorRIB(family bgp.RouteFamily, current bool) (*MonitorRIBClient, error) {
+ stream, err := cli.cli.MonitorRib(context.Background(), &api.MonitorRibRequest{
+ Table: &api.Table{
+ Type: api.Resource_GLOBAL,
+ Family: uint32(family),
+ },
+ Current: current,
})
if err != nil {
return nil, err
@@ -923,11 +926,14 @@ func (cli *Client) MonitorRIB(family bgp.RouteFamily) (*MonitorRIBClient, error)
return &MonitorRIBClient{stream}, nil
}
-func (cli *Client) MonitorAdjRIBIn(name string, family bgp.RouteFamily) (*MonitorRIBClient, error) {
- stream, err := cli.cli.MonitorRib(context.Background(), &api.Table{
- Type: api.Resource_ADJ_IN,
- Name: name,
- Family: uint32(family),
+func (cli *Client) MonitorAdjRIBIn(name string, family bgp.RouteFamily, current bool) (*MonitorRIBClient, error) {
+ stream, err := cli.cli.MonitorRib(context.Background(), &api.MonitorRibRequest{
+ Table: &api.Table{
+ Type: api.Resource_ADJ_IN,
+ Name: name,
+ Family: uint32(family),
+ },
+ Current: current,
})
if err != nil {
return nil, err