member_gateway_rpc/subscribe/subscribe.go

33 lines
575 B
Go
Raw Permalink Normal View History

2018-04-09 13:37:03 +00:00
package subscribe
import (
"git.loafle.net/commons/logging-go"
2018-05-11 08:10:21 +00:00
oer "git.loafle.net/overflow/external-go/redis"
2018-04-09 13:37:03 +00:00
ogsr "git.loafle.net/overflow/gateway/subscribe/redis"
)
var Subscriber *ogsr.Subscribers
func InitPackage() {
Subscriber = &ogsr.Subscribers{}
2018-05-11 08:10:21 +00:00
Subscriber.Conn = oer.Pool.Get()
2018-04-09 13:37:03 +00:00
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
}