member_gateway_rpc/subscribe/subscribe.go
crusader 637cdaca24 ing
2018-04-10 15:03:15 +09:00

33 lines
582 B
Go

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)
}
}
func StartPackage() {
}
func StopPackage() {
}
func DestroyPackage() {
if nil != Subscriber {
if err := Subscriber.Stop(); nil != err {
logging.Logger().Error(err)
}
}
Subscriber = nil
}