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

API 设计: Options、Config 讨论 #53

Closed
Terry-Mao opened this issue Apr 28, 2019 · 2 comments
Closed

API 设计: Options、Config 讨论 #53

Terry-Mao opened this issue Apr 28, 2019 · 2 comments
Assignees
Labels

Comments

@Terry-Mao
Copy link
Member

目前Kratos中大量都是依赖Config来初始化的,这是为了适配配置文件解析和加载,但是Kratos可能作为vendor第三方库给其他人使用,那么就需要他们自己的初始化解析配置的方式,因此API最好是提供两种,一种是全套使用kratos tool 工具链 利用toml或者将来yaml方式来启动,一种是把kratos当做第三方库,自己初始化组件,那么使用options会比较方便

@tonybase
Copy link
Member

其实框架里面应该多实现Value UnmarshalYAML就可以了,然后是kratos tool默认那种,参数选择?

@Terry-Mao
Copy link
Member Author

@tonyboxes 针对tool可以作为参数来处理,pkg还需要处理初始化option问题

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

No branches or pull requests

3 participants