Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/championlong/go-backend-common
Go通用组件
https://github.com/championlong/go-backend-common
go hbase log monitor pg pool postgressql pprof prometheus rsa thrift
Last synced: about 2 months ago
JSON representation
Go通用组件
- Host: GitHub
- URL: https://github.com/championlong/go-backend-common
- Owner: championlong
- Created: 2023-04-04T03:28:58.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-08T06:06:08.000Z (9 months ago)
- Last Synced: 2024-06-21T08:29:09.529Z (6 months ago)
- Topics: go, hbase, log, monitor, pg, pool, postgressql, pprof, prometheus, rsa, thrift
- Language: Go
- Homepage:
- Size: 162 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-backend-common
通用组件
## 介绍
| 模块 | 说明 | 引用 |
|----------|---------------------------------------------------------------------------|---------------------------------------------------------------------|
| crypto | 支持加解密,当前仅支持rsa公钥私钥加密解密 | |
| handler | 初始化prometheus和pprof相关接口,支持服务集成监控 | https://github.com/prometheus/client_golang |
| hbase | 使用[thrift2](https://thrift.apache.org/tutorial)批量操作hbase,支持连接池,减少频繁创建施放链接 | https://hbase.apache.org/ |
| postgres | 在pgv10基础上进行封装,支持数据库主从和分片配置读写 | https://github.com/go-pg/pg/v10 |
| slog | 在zap日志打印基础进行封装,支持默认初始化调用 | https://github.com/uber-go/zap |
| viper | 集成 fsnotify 和 vipe 实现多种格式的配置文件 | https://github.com/fsnotify/fsnotify https://github.com/spf13/viper |
| sql | 实现动态拼接where条件,生成查询sql | |
| app | 实现统一服务初始化模版 | |## 目录结构
```
├── app (应用启动)
├── crypto (加解密算法)
│ └── rsa
├── handler (debug相关监控端口)
├── hbase (hbase客户端)
├── postgres (PostgreSQL初始化)
├── runner (服务初始化接口)
├── slog (日志服务)
├── sql (sql动态拼接)
└── viper (读取config)
```