X-Git-Url: https://gerrit.fd.io/r/gitweb?p=govpp.git;a=blobdiff_plain;f=examples%2Fcmd%2Fstats-client%2Fstats_client.go;h=17c79564b03347276dac56aa4a8e0167598af548;hp=e0c44635c9a03084e8b76733357f0095077779e1;hb=3da2b73ec5ce77abf796ebeae6dfc149c8d3c698;hpb=de8e6592e23a3819266cea5e9999c7c21fdd826f diff --git a/examples/cmd/stats-client/stats_client.go b/examples/cmd/stats-client/stats_client.go index e0c4463..17c7956 100644 --- a/examples/cmd/stats-client/stats_client.go +++ b/examples/cmd/stats-client/stats_client.go @@ -27,15 +27,15 @@ import ( "git.fd.io/govpp.git" "git.fd.io/govpp.git/api" "git.fd.io/govpp.git/core" - "git.fd.io/govpp.git/core/bin_api/vpe" "git.fd.io/govpp.git/examples/bin_api/interfaces" + "git.fd.io/govpp.git/examples/bin_api/stats" ) func main() { fmt.Println("Starting stats VPP client...") // async connect to VPP - conn, statCh, err := govpp.AsyncConnect() + conn, statCh, err := govpp.AsyncConnect("") if err != nil { fmt.Println("Error:", err) os.Exit(1) @@ -112,10 +112,10 @@ func subscribeNotifications(ch *api.Channel) (*api.NotifSubscription, *api.Notif // requestStatistics requests interface counters notifications from VPP. func requestStatistics(ch *api.Channel) { - ch.SendRequest(&vpe.WantStats{ + ch.SendRequest(&stats.WantStats{ Pid: uint32(os.Getpid()), EnableDisable: 1, - }).ReceiveReply(&vpe.WantStatsReply{}) + }).ReceiveReply(&stats.WantStatsReply{}) } // processSimpleCounters processes simple counters received from VPP. @@ -141,4 +141,4 @@ func processCombinedCounters(counters *interfaces.VnetInterfaceCombinedCounters) counters.FirstSwIfIndex+i, counterNames[counters.VnetCounterType], counters.Data[i].Packets, counterNames[counters.VnetCounterType], counters.Data[i].Bytes) } -} +} \ No newline at end of file