[adding] kind and client_type to account connect/disconnect events (#2351)

* [adding] kind and client_type to client info. specifically account connect/disconnect events

Kind is Client/Leafnode but can take the value of Router/Gateway/JetStream/Account/System in the future.
When kind is Client, then client_type is set to mqtt/websocket/nats
This fixes #2291

Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
Matthias Hanel
2021-07-07 17:43:50 -04:00
committed by GitHub
parent 54e16e80c5
commit c68ffe5ad5
6 changed files with 102 additions and 79 deletions

View File

@@ -893,7 +893,7 @@ func TestTypeString(t *testing.T) {
}
for _, cs := range cases {
c := &client{kind: cs.intType}
typeStringVal := c.typeString()
typeStringVal := c.kindString()
if typeStringVal != cs.stringType {
t.Fatalf("Expected typeString value %q, but instead received %q", cs.stringType, typeStringVal)