grpc_pool/pool_handler.go
2017-09-05 14:42:54 +09:00

24 lines
383 B
Go

package overflow_grpc_pool
import (
"time"
"google.golang.org/grpc"
)
const (
// DefaultWriteTimeout is default value of Write Timeout
DefaultIdleTimeout = 0
DefaultMaxIdle = 0
DefaultMaxCapacity = 1
)
type PoolHandler interface {
GetIdleTimeout() time.Duration
GetMaxIdle() int
GetMaxCapacity() int
OnCreate() (*grpc.ClientConn, interface{}, error)
Validate()
}