From c17003e71b5bb8bd62e7c9be4db9f728070c8988 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Thu, 1 Aug 2019 13:53:32 +0900 Subject: docs: add aspath attribute to library usage Signed-off-by: FUJITA Tomonori --- docs/sources/lib.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/sources/lib.md b/docs/sources/lib.md index edb67522..933f3cb2 100644 --- a/docs/sources/lib.md +++ b/docs/sources/lib.md @@ -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{ -- cgit v1.2.3