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

Method GetEx

rpc/pool.go:173–182  ·  view source on GitHub ↗

GetEx returns a client with an one-off connection if it's anonymous, otherwise returns existing freelist with Get.

(id proto.NodeID, isAnonymous bool)

Source from the content-addressed store, hash-verified

171// GetEx returns a client with an one-off connection if it's anonymous,
172// otherwise returns existing freelist with Get.
173func (p *ClientPool) GetEx(id proto.NodeID, isAnonymous bool) (cli Client, err error) {
174 if isAnonymous {
175 conn, err := DialEx(id, true)
176 if err != nil {
177 return nil, err
178 }
179 return NewClient(conn), nil
180 }
181 return p.Get(id)
182}
183
184// Remove the node freelist in the pool.
185func (p *ClientPool) Remove(id proto.NodeID) {

Callers 1

TestRPCComponentsFunction · 0.95

Calls 3

GetMethod · 0.95
DialExFunction · 0.85
NewClientFunction · 0.85

Tested by 1

TestRPCComponentsFunction · 0.76