Optimize socketclient adapter and add various code improvements 71/27571/1
authorOndrej Fabry <ofabry@cisco.com>
Tue, 16 Jun 2020 08:40:34 +0000 (10:40 +0200)
committerOndrej Fabry <ofabry@cisco.com>
Tue, 16 Jun 2020 08:40:34 +0000 (10:40 +0200)
commit280b1c6c83b676ef4e592f4ecf60cb5b54b6a753
treebf9a35f020de061ba66a432411ee44866405fe76
parentf049390060630c0085fe4ad683c83a4a14a47ffb
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 <ofabry@cisco.com>
17 files changed:
CHANGELOG.md
Makefile
adapter/socketclient/doc.go
adapter/socketclient/socketclient.go
api/binapi.go
codec/msg_codec.go
core/channel.go
core/channel_test.go
core/connection.go
core/log.go
core/request_handler.go
examples/perf-bench/perf-bench.go
examples/simple-client/simple_client.go
examples/union-example/union_example.go
go.mod
go.sum
version/version.go