X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=adapter%2Fvpp_api.go;h=b32f97580b85f8fdbb2c3894f634d0d9891d9bdf;hb=d0b973030fe07dc7875da72f5ebe42d8bd9544b1;hp=71bf7c2bdb76d08cacde583b213361a9cbbe7612;hpb=d06548e4f4492c181f04a5fc9bf994764278e68b;p=govpp.git diff --git a/adapter/vpp_api.go b/adapter/vpp_api.go index 71bf7c2..b32f975 100644 --- a/adapter/vpp_api.go +++ b/adapter/vpp_api.go @@ -16,6 +16,7 @@ package adapter import ( "errors" + "fmt" ) const ( @@ -52,3 +53,14 @@ type VppAPI interface { // WaitReady waits until adapter is ready. WaitReady() error } + +// UnknownMsgError is the error type usually returned by GetMsgID +// method of VppAPI. It describes the name and CRC for the unknown message. +type UnknownMsgError struct { + MsgName string + MsgCrc string +} + +func (u *UnknownMsgError) Error() string { + return fmt.Sprintf("unknown message: %s_%s", u.MsgName, u.MsgCrc) +}