2018-04-26 08:17:12 +00:00
|
|
|
package subscribe
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.loafle.net/commons/logging-go"
|
2018-05-11 08:20:11 +00:00
|
|
|
oer "git.loafle.net/overflow/external-go/redis"
|
2018-04-26 08:17:12 +00:00
|
|
|
ogsr "git.loafle.net/overflow/gateway/subscribe/redis"
|
|
|
|
)
|
|
|
|
|
|
|
|
var Subscriber *ogsr.Subscribers
|
|
|
|
|
|
|
|
func InitPackage() {
|
|
|
|
Subscriber = &ogsr.Subscribers{}
|
2018-05-11 08:20:11 +00:00
|
|
|
Subscriber.Conn = oer.Pool.Get()
|
2018-04-26 08:17:12 +00:00
|
|
|
if err := Subscriber.Start(); nil != err {
|
|
|
|
logging.Logger().Panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func StartPackage() {
|
|
|
|
}
|
|
|
|
|
|
|
|
func StopPackage() {
|
|
|
|
}
|
|
|
|
|
|
|
|
func DestroyPackage() {
|
|
|
|
if nil != Subscriber {
|
|
|
|
if err := Subscriber.Stop(); nil != err {
|
|
|
|
logging.Logger().Error(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Subscriber = nil
|
|
|
|
}
|