msg-pusher

module
v0.0.0-...-3d0adf2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2019 License: MIT

README

msg-pusher

msg-pusher是用Golang编写的轻量级高性能消息推送微服务

使用msg-pusher可以实现:
  • 消息的实时推送
  • 消息的定时推送
目前支持一下平台的推送:
  • 阿里云短信
  • 微信公众号
  • 邮件服务
调用关系

image

核心模块
  1. receiver

     用于接收需要推送的消息,并将消息存入缓存和消息队列
    
  2. sender

     绑定消息队列,将得到数据推送到对应的服务商
    
  3. corn

     定时将缓存中的数据持久化到数据库
    
服务集成

服务集成了 prometheusjaeger ,你可以通过这些插件来观察msg-pusher的响应情况和性能状况

服务部署

msg-pusher依赖rabbit-mq、redis和mysql

  • 二进制部署
cd msg-pusher
go build -o ./dist/sender ./cmd/sender/*.go
go build -o ./dist/receiver ./cmd/receiver/*.go

./dist/sender -f conf.yaml --log-path ./
./dist/receiver -f conf.yaml --log-path ./
  • docker部署
docker run --name pusher -v $CONF_PATH:/app/msg-pusher/conf/conf.yaml -v $LOG_FILE_PATH:/app/msg-pusher/log -p 8990:8990 hiruok/msg-pusher:V0.1.0

Directories

Path Synopsis
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
cmd
receiver
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
sender
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
store
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
store/db
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
pkg
cache
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
cache/local
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
cache/redis
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
cmd
* @Author: domchan * @Date: 2018-12-28 15:30:41 * @Last Modified by: domchan * @Last Modified time: 2018-12-28 15:31:43
* @Author: domchan * @Date: 2018-12-28 15:30:41 * @Last Modified by: domchan * @Last Modified time: 2018-12-28 15:31:43
cst
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
db
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
errors
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
ip
log
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
metrics
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
mq
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
pb/meta
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
pb/tpl
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
retry/backoff
backoff 重试算法 使用retry,或retryNotify 调用可能失败的方法 demo 在demo目录下 ==================================================== # Copyright (C)2019 All rights reserved.
backoff 重试算法 使用retry,或retryNotify 调用可能失败的方法 demo 在demo目录下 ==================================================== # Copyright (C)2019 All rights reserved.
send
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
send/email
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
send/sms
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
send/wechat
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
utils
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
handler
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
middleware
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
model
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
monitor
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
router
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
service
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
version
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
msg
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
pub
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
cache
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
db
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.
mq
==================================================== # Copyright (C)2019 All rights reserved.
==================================================== # Copyright (C)2019 All rights reserved.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL