X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=adapter%2Fvppapiclient%2Fstat_client_stub.go;h=856a1e37cb99a22a86525e7f4f59309fa5e4db4e;hb=c380ee6064379258768fdfe4e9d4ad9138980ec0;hp=24f7e13c83ed78602b53bc05f25db8893e5b37e2;hpb=c00356ec332203f353fcd5f5992226940d90da92;p=govpp.git diff --git a/adapter/vppapiclient/stat_client_stub.go b/adapter/vppapiclient/stat_client_stub.go index 24f7e13..856a1e3 100644 --- a/adapter/vppapiclient/stat_client_stub.go +++ b/adapter/vppapiclient/stat_client_stub.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build windows darwin +// +build windows darwin novpp package vppapiclient @@ -20,26 +20,38 @@ import ( "git.fd.io/govpp.git/adapter" ) -// StatClient is just an stub adapter that does nothing. It builds only on Windows and OSX, where the real +// stubStatClient is just an stub adapter that does nothing. It builds only on Windows and OSX, where the real // VPP stats API client adapter does not build. Its sole purpose is to make the compiler happy on Windows and OSX. -type StatClient struct{} +type stubStatClient struct{} -func NewStatClient(socketName string) *StatClient { - return new(StatClient) +func NewStatClient(socketName string) adapter.StatsAPI { + return new(stubStatClient) } -func (*StatClient) Connect() error { +func (*stubStatClient) Connect() error { return adapter.ErrNotImplemented } -func (*StatClient) Disconnect() error { +func (*stubStatClient) Disconnect() error { return nil } -func (*StatClient) ListStats(patterns ...string) (statNames []string, err error) { +func (*stubStatClient) ListStats(patterns ...string) (indexes []adapter.StatIdentifier, err error) { return nil, adapter.ErrNotImplemented } -func (*StatClient) DumpStats(patterns ...string) ([]*adapter.StatEntry, error) { +func (*stubStatClient) DumpStats(patterns ...string) ([]adapter.StatEntry, error) { return nil, adapter.ErrNotImplemented } + +func (*stubStatClient) PrepareDir(prefixes ...string) (*adapter.StatDir, error) { + return nil, adapter.ErrNotImplemented +} + +func (*stubStatClient) PrepareDirOnIndex(indexes ...uint32) (*adapter.StatDir, error) { + return nil, adapter.ErrNotImplemented +} + +func (*stubStatClient) UpdateDir(dir *adapter.StatDir) error { + return adapter.ErrNotImplemented +}