logging has been changed.
This commit is contained in:
@@ -14,8 +14,7 @@ var _pool cgp.Pool
|
||||
func InitializePool(ctx context.Context) {
|
||||
var err error
|
||||
h := &poolHandlers{
|
||||
ctx: ctx,
|
||||
logger: logging.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
}
|
||||
h.cfg = config.Sub("grpc")
|
||||
h.MaxIdle = h.cfg.GetInt("pool.MaxIdle")
|
||||
@@ -23,6 +22,6 @@ func InitializePool(ctx context.Context) {
|
||||
|
||||
_pool, err = cgp.New(ctx, h)
|
||||
if nil != err {
|
||||
h.logger.Fatal(fmt.Sprintf("GRpc Pool: %v", err))
|
||||
logging.Logger.Fatal(fmt.Sprintf("GRpc Pool: %v", err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,14 +8,12 @@ import (
|
||||
"git.loafle.net/commons_go/config"
|
||||
cgp "git.loafle.net/commons_go/grpc_pool"
|
||||
oas "git.loafle.net/overflow/overflow_api_server/golang"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type poolHandlers struct {
|
||||
cgp.PoolHandlers
|
||||
ctx context.Context
|
||||
logger *zap.Logger
|
||||
cfg config.Configurator
|
||||
ctx context.Context
|
||||
cfg config.Configurator
|
||||
}
|
||||
|
||||
func (h *poolHandlers) OnCreate() (*grpc.ClientConn, interface{}, error) {
|
||||
|
||||
Reference in New Issue
Block a user