+var (
+ // VPP binary API adapter that will be used in the subsequent Connect calls
+ vppAdapter adapter.VppAPI
+)
+
+func getVppAdapter(addr string) adapter.VppAPI {
+ if vppAdapter == nil {
+ vppAdapter = socketclient.NewVppClient(addr)
+ }
+ return vppAdapter
+}
+
+// SetVppAdapter sets the adapter that will be used for connections to VPP in the subsequent `Connect` calls.
+func SetVppAdapter(a adapter.VppAPI) {
+ vppAdapter = a
+}