Versions in this module Expand all Collapse all v1 v1.3.1 Mar 23, 2023 Changes in this version + type Codec struct + Closer io.ReadWriteCloser + Decoder *gob.Decoder + EncBuf *bufio.Writer + Encoder *gob.Encoder + Timeout time.Duration + func (c *Codec) Close() error + func (c *Codec) ReadResponseBody(body interface{}) error + func (c *Codec) ReadResponseHeader(r *rpc.Response) error + func (c *Codec) WriteRequest(r *rpc.Request, body interface{}) (err error) + type GRPCPool struct + IdleTimeout time.Duration + Mu sync.Mutex + func NewGRPCPool(o *Options, dialOptions ...grpc.DialOption) (*GRPCPool, error) + func (c *GRPCPool) Close() + func (c *GRPCPool) Get() (*GrpcIdleConn, error) + func (c *GRPCPool) IdleCount() int + func (c *GRPCPool) Put(conn *GrpcIdleConn) error + type GrpcIdleConn struct + Conn *grpc.ClientConn + type Options struct + DialTimeout time.Duration + IdleTimeout time.Duration + InitCap int + InitTargets []string + MaxCap int + ReadTimeout time.Duration + TimeoutType TimeoutType + WriteTimeout time.Duration + func NewOptions() *Options + func (o *Options) Input() chan<- *[]string + type RPCPool struct + IdleTimeout time.Duration + Mu sync.Mutex + func NewRPCPool(o *Options) (*RPCPool, error) + func (c *RPCPool) Close() + func (c *RPCPool) Get() (*rpc.Client, error) + func (c *RPCPool) IdleCount() int + func (c *RPCPool) Put(conn *rpc.Client) error + type TCPPool struct + IdleTimeout time.Duration + Mu sync.Mutex + func NewTCPPool(o *Options) (*TCPPool, error) + func (c *TCPPool) Close() + func (c *TCPPool) Get() (net.Conn, error) + func (c *TCPPool) IdleCount() int + func (c *TCPPool) Put(conn net.Conn) error + type TimeoutType int + const FixedTimeoutType + const IdleTimeoutType v1.2.1-beta.1 Mar 23, 2023