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

Method initClient

rpc/pcaller.go:51–63  ·  view source on GitHub ↗
(isAnonymous bool)

Source from the content-addressed store, hash-verified

49}
50
51func (c *PersistentCaller) initClient(isAnonymous bool) (err error) {
52 c.Lock()
53 defer c.Unlock()
54 if c.client == nil {
55 c.client, err = DialToNodeWithPool(c.pool, c.TargetID, isAnonymous)
56 if err != nil {
57 err = errors.Wrap(err, "dial to node failed")
58 return
59 }
60 //c.TargetAddr = conn.RemoteAddr().String()
61 }
62 return
63}
64
65// Call invokes the named function, waits for it to complete, and returns its error status.
66func (c *PersistentCaller) Call(method string, args interface{}, reply interface{}) (err error) {

Callers 1

CallMethod · 0.95

Calls 1

DialToNodeWithPoolFunction · 0.85

Tested by

no test coverage detected