summaryrefslogtreecommitdiffstats
path: root/adapter/socketclient
AgeCommit message (Collapse)AuthorFilesLines
2019-11-15Improve compatibility checkingOndrej Fabry1-1/+1
- added CompatibilityError to api package to represent error with list of incompatible messages - added UnknownMsgError to adapter package to represent error for unknown message - added list of registered message types Change-Id: I2623b45135521d52612ba91e4605fc064a7fc76e Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-09-09Fix compatibility with latest master (20.01-rc0)Ondrej Fabry2-8/+126
- fixed generator for new string types - update simple client example - regenerate examples binapi for VPP 19.08 Change-Id: If4fe78c130d95641f35f75cd0262b35b032acaf8 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-09-09Use new default binapi socket with fallback to legacyOndrej Fabry1-20/+58
Change-Id: I1a6839e3bbb8d599fcbdbc2b1aff7c81f7d263c9 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-19Print info for users to stderr when socket files are missingOndrej Fabry1-2/+24
Change-Id: Ibdbfcb78b05cf80945a93ed424a7a2a03b6ea06d Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-10Fix socketclient for VPP 19.08Ondrej Fabry1-67/+79
- in VPP 19.08 the socket type has changed to STREAM and data has to be writtento VPP with single flush, otherwise msg might get mixed with next header and cause VPP to stop responding - this also fixes WaitReady for socketclient and vppapiclient Change-Id: I022724c0c09c9b92d4c695d1cf2be15994fff717 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-07-03Fix error counters for VPP 19.04Ondrej Fabry1-3/+5
Change-Id: I87251362668bbe9a31f52c1b5e9b3ab596f7b2f3 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-27Improvements for binapi-generator and support VPP 19.04 in statsclientOndrej Fabry1-1/+1
- RPC service client implementation for dumps requests now streams responses - RPC service generation is now enabled by default - examples now allow setting binapi socket address - input dir flag for binapi-generator will recursively look into dirs to support core/plugins in /usr/share/vpp/api - minor improvements in debug logs - add support for VPP 19.04 for statsclient Change-Id: I0939ee3aa6e9f850d073fc5c87aff4ccc56b0d70 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-20Add statsclient - pure Go implementation for stats APIOndrej Fabry1-0/+14
Change-Id: Ia5bab652c6089378697459f477f9060dc7a53e90 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-06Add various generator improvementsOndrej Fabry2-1/+34
- generate service implementation for modules - generate conversion maps and String() method for enums - generate module name and version as constants - rename Union_data field to XXX_UnionData for consistency - generate constant GoVppAPIPackageIsVersionN for checking compatibility with API - add example for using service clients - add some documentation to socketclient adapter - cleanup gen.go file used for generating binapi - regenerate binapi with latest VPP release (19.04.1) - change global variables Messages into a function AllMessages Change-Id: Id1ef97764570759eaa3e5a4dc14ecda7a168ee39 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-06-04Fix union data size for types with enumsOndrej Fabry1-1/+1
- this also fixed proper alphabetical order for struct tags - env var DEBUG_BINAPI_GENERATOR=y can be used to enable debug mode Change-Id: I5b08a696ad2ff2a297872f231f9229cd956ee443 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-21Change default adapter to socketclient and cleanup some logsOndrej Fabry1-12/+10
Change-Id: I16ae8dbb5214e022304f4e8ae60798b370567fc8 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-05-15Try using different type of unix socket connectionOndrej Fabry1-3/+8
Change-Id: I6abde10043c4ff4d42d15a39cca10f82327d83dc Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-05Split outgoing packet data by 4096 bytesOndrej Fabry1-37/+74
Change-Id: I92e2b60c1460873e890b0e9b6736b5a221742349 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-05Fix WaitReady for VPP client adaptersOndrej Fabry1-9/+22
Change-Id: I57d29a819132d4894691e1131b7d79e19c90456e Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2019-04-04socketclient: wait for socket to be createdVladimir Lavor1-3/+35
domain sockets are checked/watched for existence in same manner as shm prefixes also the connection attempts and timeout in between can be configured for async-connect Change-Id: I084a3efaefea10d106866968deab90d3fda77cfe Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
2019-03-08Add socketclient implementationOndrej Fabry1-0/+430
Change-Id: Ibf9edc0e5911d08229ac590b37c5afbc27f424a0 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>