diff options
author | Rastislav Szabo <raszabo@cisco.com> | 2018-07-09 07:56:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2018-07-09 07:56:15 +0000 |
commit | a679bbc78b98089f9b221bbe7de963f5274073bb (patch) | |
tree | 09efc26e2a6d8c01f9e18aeaf8345ecec6154711 /examples/cmd/stats-client | |
parent | 3f26790b479f8a0cab00093b83491e9f47648b56 (diff) | |
parent | f1bef4a3c66f4408afdeb64cda62ccd8562d0fc6 (diff) |
Merge "make api.Channel as interface"
Diffstat (limited to 'examples/cmd/stats-client')
-rw-r--r-- | examples/cmd/stats-client/stats_client.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/cmd/stats-client/stats_client.go b/examples/cmd/stats-client/stats_client.go index 17c7956..5f9966f 100644 --- a/examples/cmd/stats-client/stats_client.go +++ b/examples/cmd/stats-client/stats_client.go @@ -101,7 +101,7 @@ loop: } // subscribeNotifications subscribes for interface counters notifications. -func subscribeNotifications(ch *api.Channel) (*api.NotifSubscription, *api.NotifSubscription, chan api.Message) { +func subscribeNotifications(ch api.Channel) (*api.NotifSubscription, *api.NotifSubscription, chan api.Message) { notifChan := make(chan api.Message, 100) simpleCountersSubs, _ := ch.SubscribeNotification(notifChan, interfaces.NewVnetInterfaceSimpleCounters) @@ -111,7 +111,7 @@ func subscribeNotifications(ch *api.Channel) (*api.NotifSubscription, *api.Notif } // requestStatistics requests interface counters notifications from VPP. -func requestStatistics(ch *api.Channel) { +func requestStatistics(ch api.Channel) { ch.SendRequest(&stats.WantStats{ Pid: uint32(os.Getpid()), EnableDisable: 1, @@ -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 +} |