Open
Conversation
Contributor
Author
|
我必须要吐槽一下,这个库的架构设计实在是太差了,把功能分成这么多包的同时缺又在实现上强耦合,最让我无法接受的是,每个包主要结构的实例化、初始化居然是通过注册方式在自己包内实现的。各个功能模块在逻辑上分的比较清晰,但是在实现上各个模块界限十分模糊。另外如果tunnel必须要知道自己上层的tunnel是什么并加以处理的话,就意味着这些tunnel之间是强耦合的,不能自由拆装的,那么抽象出来的意义就不大了。 |
|
@fregie 可以试试kv数据库,可以不需要cgo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为staticstics增加了一个数据持久化层,在修改用户信息的时候会向sqlite数据库中同时修改,定期更新user traffic信息。
需要注意的是,go-sqlite3库使用了cgo和动态链接库,所以需要开启cgo编译,且运行依赖动态链接库,我觉得这并不怎么好,有没有好的建议?
另外,如果不合入 PR #351 ,则会因为运行时存在多个auth实例而产生bug。
@Loyalsoldier @p4gefau1t
resolve #348