From 280b1c6c83b676ef4e592f4ecf60cb5b54b6a753 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Tue, 16 Jun 2020 10:40:34 +0200 Subject: Optimize socketclient adapter and add various code improvements This commit includes: Features - optimized [socketclient](adapter/socketclient) adapter and add method to set client name - added list of compatible messages to `CompatibilityError` Fixes - `MsgCodec` will recover panic occurring during a message decoding - calling `Unsubscibe` will close the notification channel Other - improved log messages to provide more relevant info Examples - added more code samples of working with unions in [union example](examples/union-example) - added profiling mode to [perf bench](examples/perf-bench) example - improved [simple client](examples/simple-client) example to work properly even with multiple runs Dependencies - updated `github.com/sirupsen/logrus` dep to `v1.6.0` - updated `github.com/lunixbochs/struc` dep to `v0.0.0-20200521075829-a4cb8d33dbbe` Change-Id: I136a3968ccf9e93760d7ee2b9902fc7e6390a09d Signed-off-by: Ondrej Fabry --- adapter/socketclient/doc.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'adapter/socketclient/doc.go') diff --git a/adapter/socketclient/doc.go b/adapter/socketclient/doc.go index 0f93c56..cbb00a2 100644 --- a/adapter/socketclient/doc.go +++ b/adapter/socketclient/doc.go @@ -21,13 +21,18 @@ // // Requirements // -// The socketclient will connect to /run/vpp-api.sock by default. However this -// is not enabled in VPP configuration by default. +// The socketclient connects to unix domain socket defined in VPP configuration. // -// To enable the socket in VPP, add following section to VPP config. +// It is enabled by default at /run/vpp/api.sock by the following config section: // // socksvr { -// default +// socket-name default +// } +// +// If you want to use custom socket path: +// +// socksvr { +// socket-name /run/vpp/api.sock // } // package socketclient -- cgit 1.2.3-korg