This commit is contained in:
crusader 2018-04-10 14:54:45 +09:00
parent e1cd1e7e19
commit e490b58f10
2 changed files with 9 additions and 8 deletions

14
external/grpc/grpc.go vendored
View File

@ -18,13 +18,13 @@ func InitPackage(config *occeg.GRPC) {
if nil == config {
return
}
go func() {
conn, err := grpc.Dial(config.Address, grpc.WithInsecure())
if nil != err {
logging.Logger().Panic(err)
}
grpcClient = oci.NewOverflowApiServerClient(conn)
}()
conn, err := grpc.Dial(config.Address, grpc.WithInsecure())
if nil != err {
logging.Logger().Panic(err)
}
grpcClient = oci.NewOverflowApiServerClient(conn)
logging.Logger().Infof("GRPC: connected to %s", config.Address)
}
func StartPackage(config *occeg.GRPC) {

View File

@ -1,6 +1,7 @@
package redis
import (
"git.loafle.net/commons/logging-go"
occer "git.loafle.net/overflow/commons-go/config/external/redis"
"github.com/gomodule/redigo/redis"
)
@ -22,13 +23,13 @@ func InitPackage(config *occer.Redis) {
return redis.Dial(config.Network, config.Address)
},
}
logging.Logger().Infof("Redis: initialized [%s:%s]", config.Network, config.Address)
}
func StartPackage(config *occer.Redis) {
if nil == config {
return
}
}
func StopPackage(config *occer.Redis) {