README ¶ pkg 常使用的pkg库。 安装 go get github.com/zhufuyi/pkg@latest pkg列表 app 优雅的启动和停止服务 awss3 aws s3客户端 cache 内存和redis缓存 conf 解析yaml、json、toml配置文件 consulcli 客户端 container 客户端 dingtalk 钉钉机器人客户端 email 发邮件客户端 encoding json、proto和gob编解码 errcode http和rpc错误码 gin 相关 handlerfunc 常用handler函数 middleware 中间件 metrics 指标 auth 鉴权 breaker 熔断器 cors 跨域 logging 日志 ratelimit 限流 request id 请求id tracing 链路跟踪 ratelimit 限流 prof go profile response 返回数据封装 swagger api文档 validator 请求参数校验 grpc 相关 benchmark 压测 grpccli grpc 客户端 gtls TLS加密传输 keepalive 保持连接 loadbalance 负载均衡 metrics rpc指标 interceptor 客户端和服务端的拦截器 breaker 熔断器 jwtAuth 鉴权 logging 日志 metrics 指标 ratelimit 重试 recovery 恢复 retry 重试 timeout 超时 tracing 链路跟踪 gobash bash命令 gocron 定时任务 gocrypto 加密解密 gofile 文件处理 gohttp http客户端 goredis redis客户端 gotest 测试库 jwt 鉴权 jy2struct json或yaml转struct krand 随机数和字符串生成器 logger 日志 mconf 文本处理 mongo 客户端 mysql 客户端 nats 客户端 prof go profile redis 客户端 replacer 替换模板内容 servicerd 服务注册与发现 shield 自适应限流和熔断 snowflake id生成器 sql2code 根据sql生成不同用途代码 stat 系统和进程资源统计 tracer 链路跟踪 utils Expand ▾ Collapse ▴ Documentation ¶ Overview ¶ Package pkg is a commonly used golang packages. https://github.com/zhufuyi/pkg/blob/master/README.md Source Files ¶ View all Source files doc.go Directories ¶ Show internal Expand all Path Synopsis app awss3 cache conf consulcli container group Package group provides a sample lazy load container. Package group provides a sample lazy load container. dingtalk email encoding json proto errcode etcdcli gin handlerfunc middleware middleware/metrics prof response swagger validator gobash gocron gocrypto comCipher nolint nolint gofile gohttp goredis gotest grpc benchmark grpccli gtls gtls/certfile interceptor keepalive metrics resolve jwt jy2struct krand logger mconf mongo demo qmgo mysql query nacoscli nats npub nsub prof redis nolint nolint replacer servicerd discovery registry registry/consul registry/etcd registry/nacos shield circuitbreaker cpu ratelimit window snowflake sql2code parser stat cpu mem tracer utils Click to show internal directories. Click to hide internal directories.