Add a VppStatsRoutine() alongside main

This commit is contained in:
Pim van Pelt
2025-06-09 17:13:07 +02:00
parent fd645366b8
commit 824496c402
4 changed files with 111 additions and 7 deletions

View File

@ -10,6 +10,8 @@ import (
"github.com/posteo/go-agentx"
"github.com/posteo/go-agentx/pdu"
"github.com/posteo/go-agentx/value"
"govpp-snmp-example/vppstats"
)
func main() {
@ -89,6 +91,9 @@ func main() {
log.Fatalf("Failed to register: %v", err)
}
// Start VPP stats routine
vppstats.StartStatsRoutine()
for {
time.Sleep(100 * time.Millisecond)
}