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

endpoint是做什么的? #1

Open
cctv86 opened this issue Jul 28, 2020 · 2 comments
Open

endpoint是做什么的? #1

cctv86 opened this issue Jul 28, 2020 · 2 comments

Comments

@cctv86
Copy link

cctv86 commented Jul 28, 2020

Dao层负责数据的处理, Service 负责 逻辑的处理, transport 负责http,grpc协议的处理, endpoint是干嘛的? 没看懂。

@CANGWU
Copy link
Contributor

CANGWU commented Jul 28, 2020

欢迎交流!go-kit中倡导使用endpoint代表一种对外提供的服务,在更换http或者rpc协议层时能保证服务接口的不变。同时由于endpoint的形式是固定统一的,可以装饰一些统一的操作,比如添加统一的日志记录或者权限拦截等能力。

@cctv86
Copy link
Author

cctv86 commented Jul 28, 2020

好的,谢谢。

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