Documentation ¶
Overview ¶
Package remotecli for remote client
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { // RPCInfo as param just avoid to get it from ctx Send(ctx context.Context, ri rpcinfo.RPCInfo, req remote.Message) (err error) Recv(ctx context.Context, ri rpcinfo.RPCInfo, resp remote.Message) (err error) }
Client implementation may be different between mux and non-mux clients.
type ConnWrapper ¶
type ConnWrapper struct {
// contains filtered or unexported fields
}
ConnWrapper wraps a connection.
func NewConnWrapper ¶
func NewConnWrapper(connPool remote.ConnPool, logger klog.FormatLogger) *ConnWrapper
NewConnWrapper returns a new ConnWrapper using the given connPool and logger.
func (*ConnWrapper) GetConn ¶
func (cm *ConnWrapper) GetConn(ctx context.Context, d remote.Dialer, ri rpcinfo.RPCInfo) (net.Conn, error)
GetConn returns a connection using the given Dialer and RPCInfo.
func (*ConnWrapper) ReleaseConn ¶
func (cm *ConnWrapper) ReleaseConn(err error, ri rpcinfo.RPCInfo)
ReleaseConn should notice that ri may nil when oneway TODO duplicate release may cause problem?
Click to show internal directories.
Click to hide internal directories.