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

Function clientComplex

crypto/etls/conn_test.go:159–179  ·  view source on GitHub ↗
(pass string, args *QueryComplex)

Source from the content-addressed store, hash-verified

157}
158
159func clientComplex(pass string, args *QueryComplex) (ret *ResultComplex, err error) {
160 cipher := NewCipher([]byte(pass))
161
162 conn, err := Dial("tcp", serviceComplex, cipher)
163 if err != nil {
164 log.Errorf("client: dial: %s", err)
165 return nil, err
166 }
167 defer func() { _ = conn.Close() }()
168
169 log.Debugln("client: connected to: ", conn.RemoteAddr())
170 log.Debugln("client: LocalAddr: ", conn.LocalAddr())
171 rpcClient := rpc.NewClient(conn)
172 res := new(ResultComplex)
173
174 if err := rpcClient.Call("FooComplex.Bar", args, &res); err != nil {
175 log.Errorf("failed to call RPC %v", err)
176 return nil, err
177 }
178 return res, err
179}
180
181func handleClient(conn net.Conn) {
182 defer func() { _ = conn.Close() }()

Callers 1

TestComplexRPCFunction · 0.85

Calls 8

CallMethod · 0.95
ErrorfFunction · 0.92
DebuglnFunction · 0.92
NewCipherFunction · 0.85
RemoteAddrMethod · 0.80
LocalAddrMethod · 0.80
DialFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected