Code Review
/
govpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Change module name to go.fd.io/govpp
[govpp.git]
/
adapter
/
vppapiclient
/
vppapiclient_stub.go
diff --git
a/adapter/vppapiclient/vppapiclient_stub.go
b/adapter/vppapiclient/vppapiclient_stub.go
index
6de89a7
..
57b71c3
100644
(file)
--- a/
adapter/vppapiclient/vppapiclient_stub.go
+++ b/
adapter/vppapiclient/vppapiclient_stub.go
@@
-12,42
+12,46
@@
// See the License for the specific language governing permissions and
// limitations under the License.
// See the License for the specific language governing permissions and
// limitations under the License.
-// +build windows darwin
+// +build windows darwin
novpp
package vppapiclient
import (
package vppapiclient
import (
- "g
it.fd.io/govpp.git
/adapter"
+ "g
o.fd.io/govpp
/adapter"
)
)
-// VppClient is just an stub adapter that does nothing. It builds only on Windows and OSX, where the real
+//
stub
VppClient is just an stub adapter that does nothing. It builds only on Windows and OSX, where the real
// VPP binary API client adapter does not build. Its sole purpose is to make the compiler happy on Windows and OSX.
// VPP binary API client adapter does not build. Its sole purpose is to make the compiler happy on Windows and OSX.
-type VppClient struct{}
+type
stub
VppClient struct{}
-func NewVpp
Adapter(string) *VppClient
{
- return &VppClient{}
+func NewVpp
Client(string) adapter.VppAPI
{
+ return &
stub
VppClient{}
}
}
-func (a *VppClient) Connect() error {
+func NewVppClientWithInputQueueSize(string, uint16) adapter.VppAPI {
+ return &stubVppClient{}
+}
+
+func (a *stubVppClient) Connect() error {
return adapter.ErrNotImplemented
}
return adapter.ErrNotImplemented
}
-func (a *VppClient) Disconnect() error {
+func (a *
stub
VppClient) Disconnect() error {
return nil
}
return nil
}
-func (a *VppClient) GetMsgID(msgName string, msgCrc string) (uint16, error) {
+func (a *
stub
VppClient) GetMsgID(msgName string, msgCrc string) (uint16, error) {
return 0, nil
}
return 0, nil
}
-func (a *VppClient) SendMsg(clientID uint32, data []byte) error {
+func (a *
stub
VppClient) SendMsg(clientID uint32, data []byte) error {
return nil
}
return nil
}
-func (a *VppClient) SetMsgCallback(cb adapter.MsgCallback) {
+func (a *
stub
VppClient) SetMsgCallback(cb adapter.MsgCallback) {
// no op
}
// no op
}
-func (a *VppClient) WaitReady() error {
+func (a *
stub
VppClient) WaitReady() error {
return adapter.ErrNotImplemented
}
return adapter.ErrNotImplemented
}