summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-02-08 01:16:32 +0100
committerOndrej Fabry <ofabry@cisco.com>2019-02-08 01:16:32 +0100
commitfa21c9d726ebb807895a8571af9a16dab5cd8d6e (patch)
tree4597d483f90e374e89f3923324b531a56217a0f9 /api
parent8ba70a7b13950593aab9863246f830eda450f06b (diff)
Generator improvements and cleanup
- generator now supports include-comments flag (as opt-in) - minor code cleanup in binapi-generator - remove obsolete unit tests - flatten examples from examples/cmd folder - introduce constant for checking compatibility in future versions Change-Id: I3545f2ba4b869a3b51d6d0de7e742f3f1e1be392 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'api')
-rw-r--r--api/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/api/api.go b/api/api.go
index 57a744e..3e4eb0b 100644
--- a/api/api.go
+++ b/api/api.go
@@ -115,7 +115,6 @@ type SubscriptionCtx interface {
Unsubscribe() error
}
-// map of registered messages
var registeredMessages = make(map[string]Message)
// RegisterMessage is called from generated code to register message.
@@ -130,3 +129,7 @@ func RegisterMessage(x Message, name string) {
func GetRegisteredMessages() map[string]Message {
return registeredMessages
}
+
+// GoVppAPIPackageIsVersion1 is referenced from generated binapi files
+// to assert that that code is compatible with this version of the GoVPP api package.
+const GoVppAPIPackageIsVersion1 = true