// Call shells out to a provider and return its output
// If call succeeds, stdout is returned with no error
// If call fails, "" is return with error containing stderr
3553
func Call(provider, specPath string) (string, error) {
	var (
		stdOut bytes.Buffer
		stdErr bytes.Buffer
	)
	cmd := exec.Command(provider, specPath)
	cmd.Stdout = &stdOut
	cmd.Stderr = &stdErr
	err := cmd.Run()

	if err != nil {
		errstr := err.Error()
		if stdErr.Len() > 0 {
			errstr += ": " + strings.TrimSpace(stdErr.String())
		}
		return "", fmt.Errorf(errstr)
	}

	return strings.TrimSpace(stdOut.String()), nil
}
1145236
func (_ENS *ENSRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _ENS.Contract.ENSCaller.contract.Call(opts, result, method, params...)
}
823474
func (f CallerFunc) Call(ctx context.Context, c *scheduler.Call) (mesos.Response, error) {
	return f(ctx, c)
}
95694
func (rpc *EthRPC) Call(method string, params ...interface{}) (json.RawMessage, error) {
	request := ethRequest{
		ID:      1,
		JSONRPC: "2.0",
		Method:  method,
		Params:  params,
	}

	body, err := json.Marshal(request)
	if err != nil {
		return nil, err
	}

	response, err := rpc.client.Post(rpc.url, "application/json", bytes.NewBuffer(body))
	if response != nil {
		defer response.Body.Close()
	}
	if err != nil {
		return nil, err
	}

	data, err := ioutil.ReadAll(response.Body)
	if err != nil {
		return nil, err
	}

	if rpc.Debug {
		rpc.log.Println(fmt.Sprintf("%s\nRequest: %s\nResponse: %s\n", method, body, data))
	}

	resp := new(ethResponse)
	if err := json.Unmarshal(data, resp); err != nil {
		return nil, err
	}

	if resp.Error != nil {
		return nil, *resp.Error
	}

	return resp.Result, nil

}
1152740
func (_FIFSRegistrar *FIFSRegistrarCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _FIFSRegistrar.Contract.contract.Call(opts, result, method, params...)
}
74688
func Call(t *testing.T, clientURL string, behavior string, args url.Values) {
	args.Set("behavior", behavior)
	u, err := url.Parse(clientURL)
	require.NoError(t, err, "failed to parse URL")

	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
	defer cancel()

	u.RawQuery = args.Encode()
	log.Println("GET", u.String())
	res, err := ctxhttp.Get(ctx, nil, u.String())

	require.NoError(t, err, "request %v failed", args)
	defer res.Body.Close()

	var results []Entry
	require.NoError(t, json.NewDecoder(res.Body).Decode(&results),
		"failed to decode response for %v", args)

	for _, result := range results {
		if result.Status() != Passed && result.Status() != Skipped {
			output := result.Output()

			delete(result, statusKey)
			delete(result, outputKey)

			t.Errorf("request %v failed: tags: %v; output: %s", args, result, output)
		}
	}
}
1079071
func (c *Connection) Call(arguments ...interface{}) (interface{}, error) {
	c.lock.Lock()
	c.lastRequest++
	id := c.lastRequest
	resultChannel := make(chan *commandResult)
	c.waitingRequests[id] = resultChannel
	c.lock.Unlock()

	defer func() {
		c.lock.Lock()
		close(c.waitingRequests[id])
		delete(c.waitingRequests, id)
		c.lock.Unlock()
	}()

	err := c.sendCommand(id, arguments...)
	if err != nil {
		return nil, err
	}

	result := <-resultChannel
	if result.Status == "success" {
		return result.Data, nil
	}
	return nil, fmt.Errorf("mpv error: %s", result.Status)
}
1309302
func Call(ctx *cli.Context) command.Command {
	usage := "call [service] [endpoint] [request]"
	desc := "Returns the response for a service call"

	return command.NewCommand("call", usage, desc, func(args ...string) ([]byte, error) {
		var cargs []string

		for _, arg := range args {
			if len(strings.TrimSpace(arg)) == 0 {
				continue
			}
			cargs = append(cargs, arg)
		}

		if len(cargs) < 2 {
			return []byte("call what?"), nil
		}

		rsp, err := clic.CallService(ctx, cargs[1:])
		if err != nil {
			return nil, err
		}
		return rsp, nil
	})
}
924877
func (nc *nccClient) call(name string, in interface{}, out interface{}) error {
	nc.lock.RLock()
	client := nc.client
	nc.lock.RUnlock()
	if client == nil {
		return fmt.Errorf("Not connected")
	}
	ch := make(chan error, 1)
	go func() {
		ch <- client.Call(name, in, out)
	}()
	select {
	case err := <-ch:
		return err
	case <-time.After(nccRPCTimeout):
		return fmt.Errorf("RPC call timed out after %v", nccRPCTimeout)
	}
}
304943
func Output(cmd string, args ...string) (string, error) {
	buf := &bytes.Buffer{}
	_, err := Exec(nil, buf, os.Stderr, cmd, args...)
	return strings.TrimSuffix(buf.String(), "\n"), err
}
197719
func Output(lv Level, calldepth int, s string) error {
	return std.Output(lv, calldepth, s)
}
126992
func Call(address common.Address, input []byte, cfg *Config) ([]byte, uint64, error) {
	setDefaults(cfg)

	vmenv := NewEnv(cfg)

	sender := cfg.State.GetOrNewStateObject(cfg.Origin)
	// Call the code with the given configuration.
	ret, leftOverGas, err := vmenv.Call(
		sender,
		address,
		input,
		cfg.GasLimit,
		cfg.Value,
	)

	return ret, leftOverGas, err
}
598472
func (mr *MockEnvironMockRecorder) Provider() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockEnviron)(nil).Provider))
}
824905
func (c *Client) Call(serviceMethod string, args, ret interface{}) error {
	return c.CallWithOptions(serviceMethod, args, ret)
}
879934
func (o *Outbound) Call(ctx context.Context, req *transport.Request) (*transport.Response, error) {
	if req == nil {
		return nil, yarpcerrors.InvalidArgumentErrorf("request for tchannel outbound was nil")
	}
	if err := o.once.WaitUntilRunning(ctx); err != nil {
		return nil, intyarpcerrors.AnnotateWithInfo(yarpcerrors.FromError(err), "error waiting for tchannel outbound to start for service: %s", req.Service)
	}
	if _, ok := ctx.(tchannel.ContextWithHeaders); ok {
		return nil, errDoNotUseContextWithHeaders
	}
	p, onFinish, err := o.getPeerForRequest(ctx, req)
	if err != nil {
		return nil, toYARPCError(req, err)
	}
	res, err := p.Call(ctx, req)
	onFinish(err)
	return res, toYARPCError(req, err)
}
1110232
func (c ModuleCallInstance) Output(name string) ModuleCallOutput {
	return ModuleCallOutput{
		Call: c,
		Name: name,
	}
}
215390
func (s *Server) Stdout() string {
	io.Copy(&s.stdoutBuf, s.stdout)
	return s.stdoutBuf.String()
}