Versions in this module Expand all Collapse all v1 v1.3.0 Mar 27, 2020 v1.2.0 Mar 26, 2020 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 Options struct + DialTimeout time.Duration + IdleTimeout time.Duration + InitCap int + InitTargets []string + MaxCap int + ReadTimeout time.Duration + 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