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

Method Invoke

call.go:29–38  ·  view source on GitHub ↗

Invoke sends the RPC request on the wire and returns after response is received. This is typically called by generated code. All errors returned by Invoke are compatible with the status package.

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

Source from the content-addressed store, hash-verified

27//
28// All errors returned by Invoke are compatible with the status package.
29func (cc *ClientConn) Invoke(ctx context.Context, method string, args, reply any, opts ...CallOption) error {
30 // allow interceptor to see all applicable call options, which means those
31 // configured as defaults from dial option as well as per-call options
32 opts = combine(cc.dopts.callOptions, opts)
33
34 if cc.dopts.unaryInt != nil {
35 return cc.dopts.unaryInt(ctx, method, args, reply, cc, invoke, opts...)
36 }
37 return invoke(ctx, method, args, reply, cc, opts...)
38}
39
40func combine(o1 []CallOption, o2 []CallOption) []CallOption {
41 // we don't use append because o1 could have extra capacity whose

Callers

nothing calls this directly

Calls 2

combineFunction · 0.85
invokeFunction · 0.85

Tested by

no test coverage detected