Reload stats socket when VPP restarts 17/29017/1
authorVladimir Lavor <vlavor@cisco.com>
Tue, 22 Sep 2020 11:44:10 +0000 (13:44 +0200)
committerVladimir Lavor <vlavor@cisco.com>
Tue, 22 Sep 2020 12:40:28 +0000 (14:40 +0200)
commit9efccff8b3f3c8ba3f9e2343a5e827bfaf07a7f8
treefc1a1d1b70fc6d2dea4c289c3bad9e0575fc3e67
parent43cd23926d5eec359d4b554a4330e1aa596c76de
Reload stats socket when VPP restarts

The current implementation loads the stats socket and maps it to the
memory. If VPP restarts, the socket file is recreated while the mapped
data remain unchanged, silently failing since it does not get any updates.

This change adds socket file monitoring which reconnects and remaps
the socket file in such a case.

Change-Id: I061f7400410f4dfe5de66ba7844c4ae1567bbcbe
Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
adapter/statsclient/statsclient.go