koding / kite

Micro-service framework in Go
https://godoc.org/github.com/koding/kite
MIT License
3.26k stars 300 forks source link

kite: improve client/server connection configuration #196

Closed rjeczalik closed 7 years ago

rjeczalik commented 7 years ago

This PR reworks connection configuration part of the kite package.

Currently:

1) it is not possible to configure SockJS server handler 2) client can be configured via setting the following fields:

3) it is not possible to configure websocket client (compression, response limit etc.)

This PR unifies the configuration by adding:

1) (config.Config).SockJS 2) (config.Config).XHR + external sockjs.WebSocketUpgrader (https://github.com/igm/sockjs-go/pull/56) 3) (*config.Config).Websocket

All the changes are done in a backward-compatible way, with deprecation documentation in appropriate places.

Please take a look.