MCPcopy
hub / github.com/wavetermdev/waveterm / SendCommand

Method SendCommand

pkg/wshutil/wshrpc.go:515–528  ·  view source on GitHub ↗

no response

(command string, data any, opts *wshrpc.RpcOpts)

Source from the content-addressed store, hash-verified

513
514// no response
515func (w *WshRpc) SendCommand(command string, data any, opts *wshrpc.RpcOpts) error {
516 var optsCopy wshrpc.RpcOpts
517 if opts != nil {
518 optsCopy = *opts
519 }
520 optsCopy.NoResponse = true
521 optsCopy.Timeout = 0
522 handler, err := w.SendComplexRequest(command, data, &optsCopy)
523 if err != nil {
524 return err
525 }
526 handler.finalize()
527 return nil
528}
529
530// single response
531func (w *WshRpc) SendRpcRequest(command string, data any, opts *wshrpc.RpcOpts) (any, error) {

Callers 3

sendRpcRequestCallHelperFunction · 0.80
StreamDataAckCommandMethod · 0.80
StreamDataCommandMethod · 0.80

Calls 2

SendComplexRequestMethod · 0.95
finalizeMethod · 0.80

Tested by

no test coverage detected