raohwork / notify
client library to send notify with github.com/raohwork/notify
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Language:Go
Requires
- php: ^7
This package is auto-updated.
Last update: 2024-11-11 11:40:17 UTC
README
Package notify provides simple way to create notify server.
Creating a server is easy as
- Select and initialize a db driver (see ./model/mysqldrv)
- Select and initialize few notify drivers (see ./drivers/...)
- Create a configuration (see SenderOptions)
- Create a server with SenderOptions, and Register() your drivers
- Start(), enjoy it
Predefined binaries
There're two predefined binaries here. Both enables httpdrv.* drivers by default. You can enable sendgriddrv.* / tgdrv.* by setting environment variables.
The only difference between notify-api
and notify-api-pg
is database driver, fore one uses MySQL, the other uses PosgreSQL.
There're automated built Docker images on docker hub. Tag latest
is for notify-api
and pg
for notify-api-pg
.
FAQ
This is not well tested.
PR plz.
Is this safe to use in production?
For small scale, yes. I'm using it in production for few months, about few thousands of notifications per day, and few dozens per minute at peak.
Not tested in larger scale.
Can you add xxxx driver?
PR of driver that depends on external service (like mail driver with mailgun) will not be accepted, since I have no chance/spare time to test/maintain. Create your own repo and notify me via issue, I'll add a link in readme.
PR of DB driver is welcome if it can be tested using docker. See ./model/mysqldrv/mysql_test.go for example.
License
MPL version 2.0