Skip to content

wechat sdk 服务器,使用etcd做后端存储,支持部署多台,避免单点, 实现accesstoken中控,统一获取,自动刷新,数据watch到内存。

License

Notifications You must be signed in to change notification settings

puper/wechat-sdk-server

Repository files navigation

wechat backend

使用方法

  • 安装etcd
  docker run \
  -p 2379:2379 \
  -p 2380:2380 \
  --restart=always \
  -d \
  -v /etcd/data:/etcd-data \
  --name etcd \
  quay.io/coreos/etcd:v3.4.5 \
  /usr/local/bin/etcd \
  --name s1 \
  --data-dir /etcd-data \
  --listen-client-urls http://0.0.0.0:2379 \
  --advertise-client-urls http://0.0.0.0:2379 \
  --listen-peer-urls http://0.0.0.0:2380 \
  --initial-advertise-peer-urls http://0.0.0.0:2380 \
  --initial-cluster s1=http://0.0.0.0:2380 \
  --initial-cluster-token tkn \
  --initial-cluster-state new \
  --log-level info \
  --logger zap \
  --log-outputs stderr
  • build
    • CGO_ENABLED=0 go build -mod=vendor -o wechat-sdk-server -v .
  • 启动
    • go run main.go serve --config=config/config.toml
    • ./wechat-sdk-server serve --config=config/config.toml

api docs

About

wechat sdk 服务器,使用etcd做后端存储,支持部署多台,避免单点, 实现accesstoken中控,统一获取,自动刷新,数据watch到内存。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published