member_gateway_rpc/subscribe/subscribe.go

33 lines
582 B
Go
Raw Normal View History

2018-04-09 13:37:03 +00:00
package subscribe
import (
"git.loafle.net/commons/logging-go"
oger "git.loafle.net/overflow/gateway/external/redis"
ogsr "git.loafle.net/overflow/gateway/subscribe/redis"
)
var Subscriber *ogsr.Subscribers
func InitPackage() {
Subscriber = &ogsr.Subscribers{}
Subscriber.Conn = oger.Pool.Get()
if err := Subscriber.Start(); nil != err {
logging.Logger().Panic(err)
}
}
2018-04-10 06:03:15 +00:00
func StartPackage() {
}
2018-04-09 13:37:03 +00:00
func StopPackage() {
2018-04-10 06:03:15 +00:00
}
func DestroyPackage() {
2018-04-09 13:37:03 +00:00
if nil != Subscriber {
if err := Subscriber.Stop(); nil != err {
logging.Logger().Error(err)
}
}
Subscriber = nil
}