https://github.com/sdgmf/go-project-sample
Introduce the best practice experience of Go project with a complete project example.通过一个完整的项目示例介绍Go语言项目的最佳实践经验.
https://github.com/sdgmf/go-project-sample
best best-practice consul dashboard dependency-injection example gin golang gorm grafana grpc inject jaeger micro microservice opentracing practice prometheus sample wire
Last synced: 24 days ago
JSON representation
Introduce the best practice experience of Go project with a complete project example.通过一个完整的项目示例介绍Go语言项目的最佳实践经验.
- Host: GitHub
- URL: https://github.com/sdgmf/go-project-sample
- Owner: sdgmf
- License: apache-2.0
- Created: 2019-07-26T07:29:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-25T09:17:56.000Z (over 1 year ago)
- Last Synced: 2025-03-28T15:11:10.700Z (about 1 month ago)
- Topics: best, best-practice, consul, dashboard, dependency-injection, example, gin, golang, gorm, grafana, grpc, inject, jaeger, micro, microservice, opentracing, practice, prometheus, sample, wire
- Language: Go
- Homepage:
- Size: 531 KB
- Stars: 537
- Watchers: 16
- Forks: 104
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
通过一个完整的项目的示例,从项目的结构、分层思想、依赖注入、错误处理、单元测试、服务治理、框架选择等方面介绍Go语言项目的最佳实践经验.
项目分为products、details、ratings、reviews四个微服务,依赖关系如下.
## 准备
安装docker,go,[jsonnet](https://jsonnet.org/)
## 快速开始
下载项目
```bash
git clone https://github.com/sdgmf/go-project-sample.git
cd go-project-sample
git submodule init
git submodule update
make docker-compose
```* **访问接口**: http://localhost:8080/product/1
* **consul**: http://localhost:8500/
* **grafana**: http://localhost:3000/
* **jaeger**: http://localhost:16686/search
* **Prometheus**: http://localhost:9090/graph
* **AlertManager**: http://localhost:9093## 截图
Grafana Dashboard,可以自动生成!


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


调用链跟踪


更新更新更新
## [中文文档](https://sdgmf.github.io/goproject/)更新更新更新