Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConnNotReady = errors.ErrorCode_InternalError.WithMessage("connection is not ready")
)
Functions ¶
This section is empty.
Types ¶
type ClientConn ¶
type ClientConn struct { *grpc.ClientConn // contains filtered or unexported fields }
func NewClientConn ¶
func NewClientConn(insecure bool, opts ...kratosGrpc.ClientOption) *ClientConn
func (*ClientConn) Close ¶
func (c *ClientConn) Close() error
func (*ClientConn) Connect ¶
func (c *ClientConn) Connect() error
type ConnPool ¶
type ConnPool struct {
// contains filtered or unexported fields
}
func NewConnPool ¶
func NewConnPool(opts ...PoolOption) (*ConnPool, error)
TODO: conn pool should not be blocked and should try to reconnect
func (*ConnPool) Get ¶
func (c *ConnPool) Get() (*ClientConn, error)
type PoolOption ¶
type PoolOption func(opts *poolOptions)
func WithClientOption ¶
func WithClientOption(opts ...kratosGrpc.ClientOption) PoolOption
func WithInsecure ¶
func WithInsecure() PoolOption
func WithPoolSize ¶
func WithPoolSize(size int) PoolOption
Click to show internal directories.
Click to hide internal directories.