Documentation ¶ Index ¶ Variables type GRPCPool func (p *GRPCPool) Get(addr string) (*grpc.ClientConn, error) func (p *GRPCPool) Put(addr string, conn *grpc.ClientConn) error func (p *GRPCPool) Release(addr string) func (p *GRPCPool) ReleaseAll() Constants ¶ This section is empty. Variables ¶ View Source var ( ErrInvalidConn = errors.New("invalid connection") ) Functions ¶ This section is empty. Types ¶ type GRPCPool ¶ type GRPCPool struct { sync.RWMutex // contains filtered or unexported fields } var ( Pool GRPCPool ) func (*GRPCPool) Get ¶ func (p *GRPCPool) Get(addr string) (*grpc.ClientConn, error) func (*GRPCPool) Put ¶ func (p *GRPCPool) Put(addr string, conn *grpc.ClientConn) error func (*GRPCPool) Release ¶ func (p *GRPCPool) Release(addr string) 释放连接池 func (*GRPCPool) ReleaseAll ¶ func (p *GRPCPool) ReleaseAll() 释放所有连接池 Source Files ¶ View all Source files grpc_pool.go Click to show internal directories. Click to hide internal directories.