deprecated_overflow_gateway.../grpc/pool.go
2017-09-19 17:38:59 +09:00

27 lines
499 B
Go

package grpc
import (
"context"
"fmt"
cgp "git.loafle.net/commons_go/grpc_pool"
"git.loafle.net/commons_go/logging"
"git.loafle.net/overflow/overflow_gateway_probe/conf"
)
var _pool cgp.Pool
func InitializePool(ctx context.Context) {
var err error
h := &poolHandlers{
ctx: ctx,
}
h.MaxIdle = conf.Config.GRPC.Pool.MaxIdle
h.MaxCapacity = conf.Config.GRPC.Pool.MaxCapacity
_pool, err = cgp.New(ctx, h)
if nil != err {
logging.Logger.Fatal(fmt.Sprintf("GRpc Pool: %v", err))
}
}