Documentation ¶
Index ¶
- Variables
- type Conn
- type ConnPool
- func (p *ConnPool) Call(addr net.Addr, stream_type string, version rpc_stream.MuxVersion, ...) error
- func (p *ConnPool) Close()
- func (p *ConnPool) Go(addr net.Addr, stream_type string, version rpc_stream.MuxVersion, ...) (*rpc.Call, *Conn)
- func (p *ConnPool) RPC(addr net.Addr, stream_type string, version rpc_stream.MuxVersion, ...) error
- func (p *ConnPool) Shutdown(conn *Conn)
- type NewClientCodec
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ConnPool ¶
func NewPool ¶
func NewPool(newClientCodec NewClientCodec, maxTime time.Duration, timo time.Duration, tlsConfig *tls.Config) *ConnPool
NewPool is used to make a new connection pool Maintain at most one connection per host, for up to maxTime. Set maxTime to 0 to disable reaping. If TLS settings are provided outgoing connections use TLS.
func (*ConnPool) Call ¶
func (p *ConnPool) Call(addr net.Addr, stream_type string, version rpc_stream.MuxVersion, method string, args interface{}, reply interface{}) error
Call is used to make an RPC call to a remote host
func (*ConnPool) Go ¶
func (p *ConnPool) Go(addr net.Addr, stream_type string, version rpc_stream.MuxVersion, method string, args interface{}, reply interface{}, done chan *rpc.Call) (*rpc.Call, *Conn)
Go is used to make an RPC Go call to a remote host
type NewClientCodec ¶
type NewClientCodec func(conn io.ReadWriteCloser) netrpc.ClientCodec
Click to show internal directories.
Click to hide internal directories.