diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2019-06-26 16:28:20 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2019-06-27 07:33:14 +0200 |
commit | ef471318d66dd2832df4dc929d312f7cd5f7009a (patch) | |
tree | 49dda363eaa7ac3102425aba9f13a503b2a04f48 /examples/stats-api | |
parent | da15c397b3dbbba07d159b3af767aa13d443cfd6 (diff) |
Improvements for binapi-generator and support VPP 19.04 in statsclient
- RPC service client implementation for dumps requests
now streams responses
- RPC service generation is now enabled by default
- examples now allow setting binapi socket address
- input dir flag for binapi-generator will recursively look
into dirs to support core/plugins in /usr/share/vpp/api
- minor improvements in debug logs
- add support for VPP 19.04 for statsclient
Change-Id: I0939ee3aa6e9f850d073fc5c87aff4ccc56b0d70
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'examples/stats-api')
-rw-r--r-- | examples/stats-api/README.md | 7 | ||||
-rw-r--r-- | examples/stats-api/stats_api.go | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/examples/stats-api/README.md b/examples/stats-api/README.md index 77afad8..5511bf4 100644 --- a/examples/stats-api/README.md +++ b/examples/stats-api/README.md @@ -6,8 +6,10 @@ This example demonstrates how to retrieve statistics from VPP using [the new Sta The following requirements are required to run this example: -- install **VPP 18.10+** -- enable stats in VPP: +- install **VPP 18.10+** (VPP 19.04+ for goclient) +- enable stats in VPP + +To enable stats add following section to you VPP config: ```sh statseg { @@ -16,7 +18,6 @@ The following requirements are required to run this example: } ``` > The [default socket](https://wiki.fd.io/view/VPP/Command-line_Arguments#.22statseg.22_parameters) is located at `/run/vpp/stats.sock`. -- run the VPP (ideally with some traffic) ## Running example diff --git a/examples/stats-api/stats_api.go b/examples/stats-api/stats_api.go index e20ce7a..a42e3d2 100644 --- a/examples/stats-api/stats_api.go +++ b/examples/stats-api/stats_api.go @@ -36,8 +36,9 @@ import ( var ( statsSocket = flag.String("socket", adapter.DefaultStatsSocket, "Path to VPP stats socket") - goclient = flag.Bool("goclient", true, "Use pure Go client for stats API") dumpAll = flag.Bool("all", false, "Dump all stats including ones with zero values") + + goclient = flag.Bool("goclient", false, "Use pure Go client for stats API") ) func init() { |