-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OnSendToSubscriber Event Hooks #383
Conversation
Add OnPublishToClient description
@leijux Would merging the onAclCheck and OnSendToSubscriber into one make it cleaner and tidier? Just need to modify the parameters of onAclCheck. func (h *HookBase) OnACLCheck(cl *Client, topic string, write bool) bool to func (h *HookBase) OnACLCheck(cl *Client, pk packets.Packet, write bool) bool |
I do like merging this into OnACLCheck, in addition to the benefits you outlined, it is also a bit more performant, as hooks are not "free". Note, this capability is only usable for embedded use case as current auth hook doesn't provide mechanism to examine packet. |
@werbenhu @thedevop @leijux I'm also in favour of changing the signature of OnACLCheck, as we will otherwise be creating significant duplicated functionality. However, it will be a breaking change to OnACLCheck (and server references and tests), so I recommend opening a new PR which specifically targets this method. |
Pull Request Test Coverage Report for Build 8585944022Details
💛 - Coveralls |
See #377