We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0f16a8 commit ab6cef1Copy full SHA for ab6cef1
docs/sources/lib.md
@@ -42,6 +42,14 @@ func main() {
42
log.Error("failed to start BGP", slog.String("Error", err.Error()))
43
}
44
45
+ // set default import policy
46
+ s.SetPolicyAssignment(context.Background(), &api.SetPolicyAssignmentRequest{
47
+ Assignment: &api.PolicyAssignment{
48
+ Direction: api.PolicyDirection_POLICY_DIRECTION_IMPORT,
49
+ DefaultAction: api.RouteAction_ROUTE_ACTION_REJECT,
50
+ },
51
+ })
52
+
53
// monitor the change of the peer state
54
if err := s.WatchEvent(context.Background(), server.WatchEventMessageCallbacks{
55
OnPeerUpdate: func(peer *apiutil.WatchEventMessage_PeerEvent, _ time.Time) {
0 commit comments