Awesome Open Source
Awesome Open Source
Sponsorship

通过一个完整的项目的示例,从项目的结构、分层思想、依赖注入、错误处理、单元测试、服务治理、框架选择等方面介绍Go语言项目的最佳实践经验. 项目分为products、details、ratings、reviews四个微服务,依赖关系如下.

dependency

准备

安装docker,go,jsonnet

快速开始

下载项目

    git clone https://github.com/sdgmf/go-project-sample.git
    cd go-project-sample
    git submodule init
    git submodule update
    make docker-compose

截图

Grafana Dashboard,可以自动生成!

dashboard

dashboard1

Prometheus Alert 监控告警,自动生成!

alert

alert

调用链跟踪

jaeger

jaeger

中文文档


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (13,604
golang (3,414
dashboard (390
microservice (330
prometheus (282
grpc (257
example (224
dependency-injection (191
grafana (151
consul (111
sample (99
gin (75
micro (52
opentracing (52
gorm (44
practice (37
jaeger (19
inject (15
best (14
best-practice (13

Find Open Source By Browsing 7,000 Topics Across 59 Categories