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 { if nil == config {
return return
} }
go func() {
conn, err := grpc.Dial(config.Address, grpc.WithInsecure()) conn, err := grpc.Dial(config.Address, grpc.WithInsecure())
if nil != err { if nil != err {
logging.Logger().Panic(err) logging.Logger().Panic(err)
} }
grpcClient = oci.NewOverflowApiServerClient(conn) grpcClient = oci.NewOverflowApiServerClient(conn)
}() logging.Logger().Infof("GRPC: connected to %s", config.Address)
} }
func StartPackage(config *occeg.GRPC) { func StartPackage(config *occeg.GRPC) {

View File

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