Skip to content
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

Consider transforming the Dispatcher inside the Updater structure into an Interface? #119

Closed
lulafun opened this issue Oct 11, 2023 · 2 comments

Comments

@lulafun
Copy link

lulafun commented Oct 11, 2023

【Feature requests】

I have a modification requirement and I want to reuse the code of Updater Polling, but I need to change the logic of Dispatcher.

Currently, Dispatcher is a struct field inside Update, which prevents me from implementing custom routing logic inside Dispatcher. So I want to define Dispatcher as an interface.

May I ask what are the considerations for defining Dispatcher as a struct currently? If you have considered this modification, I can contribute code for you; otherwise, I will have to modify this project myself.

Dispatcher

@lulafun lulafun changed the title 【Feature requests】Consider transforming the Dispatcher inside the Updater structure into an Interface? Consider transforming the Dispatcher inside the Updater structure into an Interface? Oct 11, 2023
@PaulSonOfLars
Copy link
Owner

Hi @ajsdhfb , sorry for the late reply - github never notified me about this issue being raised!

I'd be happy to look into moving the Dispatcher to an interface; that makes sense to me.

However, I'd first like to hear what your custom implementation would look like, and what methods you expect to need; this would allow me to make sure that the interface is relevant to your usage. How does that sound to you?

Right now, I would assume that only the Start(...) and Stop() methods are necessary. Does that sound about right?

@PaulSonOfLars
Copy link
Owner

Resolved by #120. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants