aboutsummaryrefslogtreecommitdiffstats
path: root/adapter/vpp_api.go
diff options
context:
space:
mode:
Diffstat (limited to 'adapter/vpp_api.go')
-rw-r--r--adapter/vpp_api.go12
1 files changed, 12 insertions, 0 deletions
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)
+}