statsclient: allow index as pattern 70/31670/6
authorVladimir Lavor <vlavor@cisco.com>
Wed, 17 Mar 2021 11:27:10 +0000 (12:27 +0100)
committerVladimir Lavor <vlavor@cisco.com>
Wed, 5 May 2021 11:26:19 +0000 (13:26 +0200)
commitc380ee6064379258768fdfe4e9d4ad9138980ec0
tree28903f9ee23bb3206e21a2c04001ebfc560de944
parenta6607d9c1ba37320984c13580c932076cbff6dd6
statsclient: allow index as pattern

* ListStats() returns stats identifiers containing the stat name and index
* New method PrepareDirOnIndex(indexes...). Instead of the name filter
  it does not browse through all available indexes
* Stats example shows how to get the last epoch value (added "e" or "epoch" command)

Change-Id: Ibb15090fb0dfdb7f9b0ecf8ac07a5eb9a9ace8f8
Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
adapter/mock/mock_stats_adapter.go
adapter/stats_api.go
adapter/statsclient/stat_segment_api.go
adapter/statsclient/statsclient.go
adapter/statsclient/statseg_v1.go
adapter/statsclient/statseg_v2.go
adapter/vppapiclient/stat_client.go
adapter/vppapiclient/stat_client_stub.go
examples/stats-client/stats_api.go