member_gateway_rpc/subscribe/subscribe.go
crusader 61aa8c6acd ing
2018-05-11 17:10:21 +09:00

33 lines
575 B
Go

package subscribe
import (
"git.loafle.net/commons/logging-go"
oer "git.loafle.net/overflow/external-go/redis"
ogsr "git.loafle.net/overflow/gateway/subscribe/redis"
)
var Subscriber *ogsr.Subscribers
func InitPackage() {
Subscriber = &ogsr.Subscribers{}
Subscriber.Conn = oer.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
}