All Projects → generals-space → gokit

generals-space / gokit

Licence: other
go-kit example. go-kit微服务探索实践

Programming Languages

go
31211 projects - #10 most used programming language
Roff
2310 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to gokit

kun
A communication toolkit for Go services.
Stars: ✭ 78 (+8.33%)
Mutual labels:  go-kit, gokit
glog-gokit
This packages is a replacement for glog in projects that use the go-kit logger.
Stars: ✭ 18 (-75%)
Mutual labels:  gokit
protoc-gen-kit
Protoc compiler for Go kit code
Stars: ✭ 17 (-76.39%)
Mutual labels:  go-kit
grpc-go-kit-example
go-kit and gRPC
Stars: ✭ 30 (-58.33%)
Mutual labels:  go-kit
clean-architecture
Example about clean architecture in golang
Stars: ✭ 20 (-72.22%)
Mutual labels:  go-kit
gk
Go-Kit Genetator
Stars: ✭ 29 (-59.72%)
Mutual labels:  go-kit
micro-service-practice
OpenStack+Docker+RestAPI+OAuth/HMAC+RabbitMQ/ZMQ+OpenResty/HAProxy/Nginx/APIGateway+Bootstrap/AngularJS+Ansible+K8S/Mesos/Marathon构建/探索微服务最佳实践。
Stars: ✭ 25 (-65.28%)
Mutual labels:  go-kit
go-distsys
Distributed Systems programming examples in the Go programming language.
Stars: ✭ 101 (+40.28%)
Mutual labels:  gokit

参考文章

  1. go-kit offical example
    • 官方示例
    • DDD(domain drive design) 领域驱动设计
    • ...过度设计, 不宜用作入门
  2. 一、go 语言编写 grpc 微服务实例
    • 系列文章
    • 看看概念和思路就好, 代码示例比较生硬, 而且代码质量并不高.
  3. Micro-services Using Go-kit: REST Endpoint
    • 系列文章, 层层递进, 代码详尽, 推荐
    • 限流, 断路器, 监控, 日志等详细的解决方案.
  4. opencensus-gokit-example
    • 一个完整的项目, 涉及到go-kit的多种组件
  5. go-kit微服务系列目录
    • 系列文章
    • 条理分明, 概念解释得很清晰
    • 代码质量很高, 结构与风格与参考文章3相似

本仓库中示例06.gokit-playground-example是最完整的系列示例, 取自示例05.gokit系列文章(译), 但是添加了很多注释, 比较复杂的示例也做了拆分, 理解起来会更容易.

历史记录

Endpoint类似于web服务的url接口, 一个endpoint表示一个路由接口.

但是Endpoint不能直接对外提供服务, 需要通过Transport转换成http/grpc类型的接口才可以.

2018-09-06

在完成第4个demo时意识到go-kit貌似什么都没有做, 没有gateway(入口路由服务), 微服务间通信为原生grpc, http处理为原生net/http库. ta就像js里的backbone, 定义好一些核心概念, 组件如何定义, 组件间如何配合, 数据接口如何定义等完全不管...

只有一点, 通过makeXXXEndpointencode, decode几个函数后, 我们写的业务逻辑可以同时生成http/grpc两种接口, 只要选择不同的transport进行NewServer操作即可, 但这grpc-ecosystem包也能完成.

我已实在想不出继续用ta的理由了, 接下来尝试ta的middleware和监控什么的, 但下一步的重点会放在go-micro上.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].