emiago / diago

Short of Dialog + GO. Library/Framework for building VOIP solutions in GO
Mozilla Public License 2.0
105 stars 10 forks source link

add check for already registered handlers #18

Closed Qjawko closed 1 month ago

Qjawko commented 1 month ago

Resolves issue

emiago commented 1 month ago

Hi @Qjawko . Why you can not overwrite them after?

Qjawko commented 1 month ago

@emiago It's possible, but I think this approach will be more friendly for projects that already built on top of the sipgo package and for developers.

Sorry for late response

emiago commented 1 month ago

Hi @Qjawko I disagree. You are passing here dependency at constructor level with expectation that this dependency will be used. You need to see as diago is provisioning your server not other way around. If you want to override behavior you will do after constructor. If this was on serve level (which was initially) that I could see your point. What may happen in feature that you can override behavior using diago handlers (middlewares), but once we find more reason to have this exposed. So I am rejecting this as value vs complexity is right now big. Please open issue first to have discussion first.