24 lines
383 B
Go
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()
|
|
}
|