Hi, first of all sorry for such noob question.
I'm need to write go based program utilizing govpp stats-api.
There is official example in library which I've trunk to minimal usable which 
only opens socket:
~/GoVpp/govpp$ cat examples/stats-client/stats_api.go
package main

import (
        "log"
        "git.fd.io/govpp.git/adapter/statsclient"
        "git.fd.io/govpp.git/core"
)

func main() {
        var (
                client *statsclient.StatsClient
                c      *core.StatsConnection
                err    error
        )

        client = statsclient.NewStatsClient("/run/vpp/stats.sock") 
//(*statsSocket)
        c, err = core.ConnectStats(client)
        if err != nil {
                log.Fatalln("Connecting failed:", err)
        }
        defer c.Disconnect()
}

In case I build it from govpp package with the help of make examples it works, 
but when I've created separete my own project execution fails with error:
$ sudo ./stats
2021/03/25 15:43:01 Connecting failed: stat segment version is not supported: 2 
(minimal version: 1)

What the difference when building the same file from govpp library folder from 
separate project?

You may look all my steps to reproduce problem here 
https://pastebin.com/Lv89BrVk
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19021): https://lists.fd.io/g/vpp-dev/message/19021
Mute This Topic: https://lists.fd.io/mt/81606546/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to