We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm wanting to set a custom description on each peer that I configure. In my test app I have the following code:
results, err := client.WatchEvent(context.Background(), &api.WatchEventRequest{ Peer: &api.WatchEventRequest_Peer{}, Table: &api.WatchEventRequest_Table{}, }) go func(ctx context.Context, client api.GobgpApiClient, results api.GobgpApi_WatchEventClient) { for { r, err := results.Recv() if err != nil { fmt.Printf("there's an error: %+v", err) continue } parseStateChange(r) } }(context.Background(), client, results) for i := 0; i <= 10; i++ { client.AddPeer(context.Background(), &api.AddPeerRequest{Peer: &api.Peer{ ApplyPolicy: nil, Conf: &api.PeerConf{ AuthPassword: "", Description: "test-description", LocalAsn: 0, NeighborAddress: fmt.Sprintf("1.1.1.%d", i), PeerAsn: 1234, }, }}) } <-done }
When I log the event, I'm only getting the local_asn, neighbor_address and peer_asn in the peer config message.
local_asn
neighbor_address
peer_asn
EVENT &{type:STATE peer:{conf:{local_asn:64512 neighbor_address:"1.1.1.4" peer_asn:1234} state:{local_asn:64512 neighbor_address:"1.1.1.4" peer_asn:1234 session_state:IDLE router_id:"<nil>"} transport:{local_address:"<nil>"}}}
How can I get access to the description field?
I tried
description := event.Peer.Peer.Conf.Description
But that always returns an empty string.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm wanting to set a custom description on each peer that I configure. In my test app I have the following code:
When I log the event, I'm only getting the
local_asn
,neighbor_address
andpeer_asn
in the peer config message.How can I get access to the description field?
I tried
But that always returns an empty string.
The text was updated successfully, but these errors were encountered: