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