MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Get

Method Get

rpc/mux/pool.go:154–158  ·  view source on GitHub ↗

Get returns existing session to the node, if not exist try best to create one.

(id proto.NodeID)

Source from the content-addressed store, hash-verified

152
153// Get returns existing session to the node, if not exist try best to create one.
154func (p *SessionPool) Get(id proto.NodeID) (conn rpc.Client, err error) {
155 var sess *Session
156 sess, _ = p.getSession(id)
157 return sess.Get()
158}
159
160// oneOffMuxConn wraps a mux.Session to implement net.Conn.
161type oneOffMuxConn struct {

Callers 3

GetExMethod · 0.95
BenchmarkSessionPool_GetFunction · 0.95
TestNewSessionPoolFunction · 0.95

Calls 2

getSessionMethod · 0.95
GetMethod · 0.95

Tested by 2

BenchmarkSessionPool_GetFunction · 0.76
TestNewSessionPoolFunction · 0.76