Minimal example code using latest GoBGP and gRPC API:
stream, err := client.WatchEvent(ctx, &pb.WatchEventRequest{
Table: &pb.WatchEventRequest_Table{
Filters: []*pb.WatchEventRequest_Table_Filter{
{
Type: pb.WatchEventRequest_Table_Filter_BEST,
Init: true,
},
},
},
})
for {
r, err := stream.Recv()
if err == io.EOF {
break
} else if err != nil {
return err
}
t := r.GetTable()
if t == nil {
continue
}
destinations := apiutil.NewDestination(&pb.Destination{Paths: t.Paths})
for _, path := range destinations.Paths {
...
}
}
I expect that path.Best will be true or false, but it is always false.
At the same time ListPath method returns correct values.
Is this bug or planned behavior?