diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-08-01 13:53:32 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-08-01 14:34:55 +0900 |
commit | c17003e71b5bb8bd62e7c9be4db9f728070c8988 (patch) | |
tree | a60250fa0e2aaf104521dc5725c560d079659dae /docs | |
parent | 448c4368bcfa2bd709511142431788ce4918aa2f (diff) |
docs: add aspath attribute to library usage
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/sources/lib.md | 10 |
1 files changed, 9 insertions, 1 deletions
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{ |