Documentation ¶
Overview ¶
* User: cr-mao Date: 2023/8/27 08:53 Email: crmao@qq.com Desc: pool.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConn = errors.New("grpc conn has error Shutdown or TransientFailure")
Functions ¶
Types ¶
type ClientBuilder ¶
type ClientBuilder struct {
// contains filtered or unexported fields
}
func NewClientBuilder ¶
func NewClientBuilder(opts *Options) *ClientBuilder
func (*ClientBuilder) GetConn ¶
func (b *ClientBuilder) GetConn(target string) (*grpc.ClientConn, error)
Build 构建连接
type Options ¶
type Options struct { PoolSize uint32 DialOpts []grpc.DialOption }
Click to show internal directories.
Click to hide internal directories.