Skip to content

Commit

Permalink
docs: add aspath attribute to library usage
Browse files Browse the repository at this point in the history
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
  • Loading branch information
fujita committed Aug 1, 2019
1 parent 448c436 commit c17003e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/sources/lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,15 @@ func main() {
a2, _ := ptypes.MarshalAny(&api.NextHopAttribute{
NextHop: "10.0.0.1",
})
attrs := []*any.Any{a1, a2}
a3, _ := ptypes.MarshalAny(&api.AsPathAttribute{
Segments: []*api.AsSegment{
{
Type: 2,
Numbers: []uint32{6762, 39919, 65000, 35753, 65000},
},
},
})
attrs := []*any.Any{a1, a2, a3}

_, err := s.AddPath(context.Background(), &api.AddPathRequest{
Path: &api.Path{
Expand Down

0 comments on commit c17003e

Please sign in to comment.