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

Proxy plugin model #4

Closed
xgfone opened this issue Jul 7, 2017 · 1 comment
Closed

Proxy plugin model #4

xgfone opened this issue Jul 7, 2017 · 1 comment

Comments

@xgfone
Copy link

xgfone commented Jul 7, 2017

对每个代理,应该定义一个Interface,然后提供一个注册函数。这样只要别人实现了代理插件并进行注册,然后重新编译一下代码,就可以使用新的代理。这样方式,不用修改原包的代码,只需要添加一个导入语句即可,如:

import _ "github.com/someone/proxy-pool-plugin"
@henson
Copy link
Owner

henson commented Jul 7, 2017

很好的建议,抽空来改一下,谢谢

@henson henson closed this as completed Jul 7, 2017
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