casbin-rs icon indicating copy to clipboard operation
casbin-rs copied to clipboard

Shouldn't watcher callback be passed the notification data

Open byrnedo opened this issue 1 year ago • 2 comments

Hi, I've implemented my own watcher for sqlx & postgres and it works fine. One thing that I noticed is that the callback function signature doesn't include any way to pass the notification payload. It would be great if this was passed to the callback. The go version passes the payload

byrnedo avatar Mar 21 '25 08:03 byrnedo

@byrnedo what payload do you mean?

hsluoyz avatar Mar 21 '25 09:03 hsluoyz

@hsluoyz oh sorry, I meant great if the function signature could accept a String payload like the go version does.

It's up to the watcher implementation to pass it in if it wants/can.

byrnedo avatar Mar 21 '25 11:03 byrnedo

:tada: This issue has been resolved in version 2.13.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Sep 24 '25 16:09 github-actions[bot]