v0.10.0
This release is a massive rewrite of Centrifuge library (actually of some part of it) which should make library a more generic solution. Several opinionated and restrictive parts removed to make Centrifuge feel as a reasonably thin wrapper on top of strict client-server protocol.
Most work done inside #129 pr and relates to #128 issue.
Release highlights:
- Layer with namespace configuration and channel rules removed. Now developer is responsible for all permission checks and channel rules.
- Hard dependency on JWT and predefined claims removed. Users are now free to use any token implementation – like Paceto tokens for example, use any custom claims etc.
- Event handlers that not set now always lead to
Not available
error returned to client. - All event handlers now should be set to
Node
before calling itsRun
method. - Centrifuge still needs to know some core options for channels to understand whether to use presence inside channels, keep Publication history stream or not. It's now done over user-defined callback function in Node Config called
ChannelOptionsFunc
. See its detailed description in library docs. - More idiomatic error handling in event handlers, see #134.
- Aliases to
Raw
,Publication
andClientInfo
Protobuf types removed from library public API, see #136 - Support Redis Sentinel password option
Look at updated example in README and examples folder to find out more.
I hope to provide more guidance about library concepts in the future. I feel sorry for breaking things here but since we don't have v1 release yet, I believe this is acceptable. An important note is that while this release has lots of removed parts it's still possible (and not too hard) to implement the same functionality as before on top of this library. Feel free to ask any questions in our community chats.