X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=adapter%2Fvppapiclient%2Fvppapiclient_stub.go;h=4df051cb3ace79de8c2fd8c927ee790c787834b8;hb=f614a0af720702c8db959b6641b4faea5f98c339;hp=6de89a7de6ccc7c639a432fdd45f58017b1bcf33;hpb=c00356ec332203f353fcd5f5992226940d90da92;p=govpp.git diff --git a/adapter/vppapiclient/vppapiclient_stub.go b/adapter/vppapiclient/vppapiclient_stub.go index 6de89a7..4df051c 100644 --- a/adapter/vppapiclient/vppapiclient_stub.go +++ b/adapter/vppapiclient/vppapiclient_stub.go @@ -20,34 +20,38 @@ import ( "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 +// stubVppClient 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. -type VppClient struct{} +type stubVppClient struct{} -func NewVppAdapter(string) *VppClient { - return &VppClient{} +func NewVppClient(string) adapter.VppAPI { + return &stubVppClient{} } -func (a *VppClient) Connect() error { +func NewVppClientWithInputQueueSize(string, uint16) adapter.VppAPI { + return &stubVppClient{} +} + +func (a *stubVppClient) Connect() error { return adapter.ErrNotImplemented } -func (a *VppClient) Disconnect() error { +func (a *stubVppClient) Disconnect() error { return nil } -func (a *VppClient) GetMsgID(msgName string, msgCrc string) (uint16, error) { +func (a *stubVppClient) GetMsgID(msgName string, msgCrc string) (uint16, error) { return 0, nil } -func (a *VppClient) SendMsg(clientID uint32, data []byte) error { +func (a *stubVppClient) SendMsg(clientID uint32, data []byte) error { return nil } -func (a *VppClient) SetMsgCallback(cb adapter.MsgCallback) { +func (a *stubVppClient) SetMsgCallback(cb adapter.MsgCallback) { // no op } -func (a *VppClient) WaitReady() error { +func (a *stubVppClient) WaitReady() error { return adapter.ErrNotImplemented }