Code Review
/
govpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add comments to provide info about VPP requirements
[govpp.git]
/
adapter
/
vppapiclient
/
vppapiclient_stub.go
diff --git
a/adapter/vppapiclient/vppapiclient_stub.go
b/adapter/vppapiclient/vppapiclient_stub.go
index
6de89a7
..
4df051c
100644
(file)
--- a/
adapter/vppapiclient/vppapiclient_stub.go
+++ b/
adapter/vppapiclient/vppapiclient_stub.go
@@
-20,34
+20,38
@@
import (
"git.fd.io/govpp.git/adapter"
)
"git.fd.io/govpp.git/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
}