package grpc import ( "context" "fmt" "git.loafle.net/commons_go/config" cgp "git.loafle.net/commons_go/grpc_pool" "git.loafle.net/commons_go/logging" ) var _pool cgp.Pool func InitializePool(ctx context.Context) { var err error h := &poolHandlers{ ctx: ctx, logger: logging.WithContext(ctx), } h.cfg = config.Sub("grpc") h.MaxIdle = h.cfg.GetInt("pool.MaxIdle") h.MaxCapacity = h.cfg.GetInt("pool.MaxCapacity") _pool, err = cgp.New(ctx, h) if nil != err { h.logger.Fatal(fmt.Sprintf("GRpc Pool: %v", err)) } }