MCPcopy
hub / github.com/grpc/grpc-go / Invoke

Method Invoke

balancer_wrapper.go:372–381  ·  view source on GitHub ↗

Invoke performs a unary RPC. If the addrConn is not ready, returns errSubConnNotReady.

(ctx context.Context, method string, args any, reply any, opts ...CallOption)

Source from the content-addressed store, hash-verified

370// Invoke performs a unary RPC. If the addrConn is not ready, returns
371// errSubConnNotReady.
372func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args any, reply any, opts ...CallOption) error {
373 cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...)
374 if err != nil {
375 return err
376 }
377 if err := cs.SendMsg(args); err != nil {
378 return err
379 }
380 return cs.RecvMsg(reply)
381}
382
383type refCountedProducer struct {
384 producer balancer.Producer

Callers

nothing calls this directly

Calls 3

NewStreamMethod · 0.95
SendMsgMethod · 0.95
RecvMsgMethod · 0.95

Tested by

no test coverage detected