// Call mocks base method
354117
func (m *MockRPCClient) Call(ctx context.Context, rpcType protos.RPCType, route *route.Route, session *session.Session, msg *message.Message, server *cluster.Server) (*protos.Response, error) {
	ret := m.ctrl.Call(m, "Call", ctx, rpcType, route, session, msg, server)
	ret0, _ := ret[0].(*protos.Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
336352
func (mr *MockRPCClientMockRecorder) Call(ctx, rpcType, route, session, msg, server interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Call", reflect.TypeOf((*MockRPCClient)(nil).Call), ctx, rpcType, route, session, msg, server)
}
635925
func (c *ExtensionManagerClient) Call(registry, item string, request osquery.ExtensionPluginRequest) (*osquery.ExtensionResponse, error) {
	return c.Client.Call(context.Background(), registry, item, request)
}
346032
func (r *Relay) Call(fn string, args ...interface{}) {
	r.exchange.callRelayMethod(r, fn, args...)
}
799504
func (mr *MockRunnerMockRecorder) Run(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRunner)(nil).Run), arg0)
}
159848
func Call(ctx context.Context, request Request, response interface{}, opts ...CallOption) error {
	return DefaultClient.Call(ctx, request, response, opts...)
}
991831
func (r *Request) call(handlers Handlers, pkt requestPacket) responsePacket {
	switch r.Method {
	case "Get":
		return fileget(handlers.FileGet, r, pkt)
	case "Put":
		return fileput(handlers.FilePut, r, pkt)
	case "Setstat", "Rename", "Rmdir", "Mkdir", "Symlink", "Remove":
		return filecmd(handlers.FileCmd, r, pkt)
	case "List":
		return filelist(handlers.FileList, r, pkt)
	case "Stat", "Readlink":
		return filestat(handlers.FileList, r, pkt)
	default:
		return statusFromError(pkt,
			errors.Errorf("unexpected method: %s", r.Method))
	}
}
648671
func (o UnaryValidatorOutbound) Call(ctx context.Context, request *transport.Request) (*transport.Response, error) {
	if err := transport.ValidateRequest(request); err != nil {
		return nil, err
	}

	if err := transport.ValidateRequestContext(ctx); err != nil {
		return nil, err
	}

	return o.UnaryOutbound.Call(ctx, request)
}
979259
func (m *Middleware) Call(ctx context.Context, req *transport.Request, out transport.UnaryOutbound) (*transport.Response, error) {
	call := m.graph.begin(ctx, transport.Unary, _directionOutbound, req)
	res, err := out.Call(ctx, req)

	isApplicationError := false
	if res != nil {
		isApplicationError = res.ApplicationError
	}
	call.EndWithAppError(err, isApplicationError)
	return res, err
}
620215
func (f ES6Formatter) Call(name string) (string, string) {
	return ES6Identifier(name), "import { " + ES6Identifier(name) + " } from '" + name + ".js';"
}
1237950
func (f Function) Call(args ...interface{}) error {
	if !f.IsValid() {
		return errors.New("invalid function")
	}
	return f.Caller.Call(args...)
}
1245784
func (m *Mock) Called(arguments ...interface{}) *MockResult {
	var timeout time.Duration
	defer func() {
		m.mutex.Unlock()
		if timeout > 0 {
			time.Sleep(timeout)
		}
	}()
	m.mutex.Lock()

	pc, _, _, ok := runtime.Caller(1)
	if !ok {
		panic("Could not get the caller information")
	}

	functionPath := runtime.FuncForPC(pc).Name()
	parts := strings.Split(functionPath, ".")
	functionName := parts[len(parts)-1]

	if f := m.find(functionName, arguments...); f != nil {
		// Increase the counter
		f.count++
		f.order = m.order
		m.order++

		if f.call.IsValid() {
			typ := f.call.Type()
			numIn := typ.NumIn()
			numArgs := len(arguments)

			// Assign arguments in order.
			// Not all of them are strictly required.
			values := make([]reflect.Value, numIn)
			for i := 0; i < numIn; i++ {
				if i < numArgs {
					values[i] = reflect.ValueOf(arguments[i])
				} else {
					values[i] = reflect.Zero(typ.In(i))
				}
			}

			if typ.IsVariadic() {
				values = f.call.CallSlice(values)
			} else {
				values = f.call.Call(values)
			}

			f.ReturnValues = []interface{}{}
			for i := range values {
				f.ReturnValues = append(f.ReturnValues, values[i].Interface())
			}
		}

		timeout = f.timeout

		if f.PanicValue != nil {
			panic(f.PanicValue)
		}

		// Return to arguments
		for _, r := range f.ReturnToArguments {
			arg := arguments[r.Argument]
			argTyp := reflect.TypeOf(arg)
			argElem := reflect.ValueOf(arg).Elem()
			typ := reflect.TypeOf(r.Value)
			if typ.Kind() == reflect.Ptr {
				if typ == argTyp {
					// *type vs *type
					argElem.Set(reflect.ValueOf(r.Value).Elem())
				} else {
					// *type vs **type
					argElem.Set(reflect.ValueOf(r.Value))
				}
			} else {
				if typ == argTyp.Elem() {
					// type vs *type
					argElem.Set(reflect.ValueOf(r.Value))
				} else {
					// type vs **type
					value := reflect.New(typ).Elem()
					value.Set(reflect.ValueOf(r.Value))
					argElem.Set(value.Addr())
				}
			}
		}

		return &MockResult{f.ReturnValues}
	}

	var msg string
	if len(arguments) == 0 {
		msg = fmt.Sprintf("Mock call missing for %s()", functionName)
	} else {
		argsStr := pretty.Sprintf("%# v", arguments)
		argsStr = argsStr[15 : len(argsStr)-1]
		msg = fmt.Sprintf("Mock call missing for %s(%s)", functionName, argsStr)
	}
	panic(msg)
}
1099749
func (o *Object) Call(method string, flags Flags, args ...interface{}) *Call {
	return <-o.createCall(context.Background(), method, flags, make(chan *Call, 1), args...).Done
}
1122984
func (this *SafeRpcConnPools) Call(addr, method string, args interface{}, resp interface{}) error {
	connPool, exists := this.Get(addr)
	if !exists {
		return fmt.Errorf("%s has no connection pool", addr)
	}

	conn, err := connPool.Get()
	if err != nil || conn == nil { //conn可能为空,这也属于异常情况 add by niean
		return fmt.Errorf("%s get connection fail: conn %v, err %v", addr, conn, err)
	}

	rpcClient := conn.(RpcClient)
	callTimeout := time.Duration(this.CallTimeout) * time.Millisecond

	done := make(chan error, 1)
	go func() {
		done <- rpcClient.Call(method, args, resp)
	}()

	select {
	case <-time.After(callTimeout):
		connPool.ForceClose(conn)
		return fmt.Errorf("CallTimeout: %s", addr)
	case err = <-done:
		if err != nil {
			connPool.ForceClose(conn)
		} else {
			connPool.Release(conn)
		}
		return err
	}
}
1031794
func (c Context) Caller() Context {
	c.l = c.l.Hook(ch)
	return c
}
373229
func (c *WSClient) Call(ctx context.Context, method string, params map[string]interface{}) error {
	request, err := types.MapToRequest(c.cdc, types.JSONRPCStringID("ws-client"), method, params)
	if err != nil {
		return err
	}
	return c.Send(ctx, request)
}
374192
func (g *generators) call(th *starlark.Thread, ctx *genCtx) (errs errors.MultiError) {
	if g.runningNow {
		return errors.MultiError{
			fmt.Errorf("can't call generators while they are already running"),
		}
	}
	g.runningNow = true
	defer func() { g.runningNow = false }()

	fc := builtins.GetFailureCollector(th)

	for _, cb := range g.gen {
		if fc != nil {
			fc.Clear()
		}
		if _, err := starlark.Call(th, cb, starlark.Tuple{ctx}, nil); err != nil {
			if fc != nil && fc.LatestFailure() != nil {
				// Prefer this error, it has custom stack trace.
				errs = append(errs, fc.LatestFailure())
			} else {
				errs = append(errs, err)
			}
		}
	}
	return
}