-
Notifications
You must be signed in to change notification settings - Fork 81
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
Make DefaultGateway open #733
Comments
Maybe I don't understand this right, but isn't delegation enough for your usecase? class YourGateway(private val delegate: Gateway) : Gateway by delegate {
override val events: SharedFlow<Event> = TODO("use 'delegate.events' and intercept/transform as needed")
} |
No because this doesn't give me access to the raw payloads from the gateway, which is what I want. |
Ok, then I didn't understand this right. But just making So to support usecases like yours, we would need some major design work to avoid a half-baked solution. If you want full control over the gateway and raw payloads you can always implement your own |
Implementing my own is exactly what I'm trying to avoid doing. Ideally there would be some kind of system built into Kord that can do stuff like queueing gateway events and then also read them from that queue again. However in the interest of time a temporary half-baked solution is what I'm after right now. |
In order to use my own queue system (in my case with RabbitMQ) I would like to intercept gateway events and put them into my own queues. Unfortunately DefaultGateway is not an open class and thus cannot be extended and overwritten. Ideally there should also be some kind of way to inject events into the Gateway from outside sources (like RabbitMQ), though this might already be possible(?)
The text was updated successfully, but these errors were encountered: