MCPcopy
hub / github.com/cloudfoundry/cli / Run

Method Run

command/plugin/shared/rpc.go:52–64  ·  view source on GitHub ↗
(path string, command string)

Source from the content-addressed store, hash-verified

50}
51
52func (r RPCService) Run(path string, command string) error {
53 err := r.rpcService.Start()
54 if err != nil {
55 return err
56 }
57 defer r.rpcService.Stop()
58
59 cmd := exec.Command(path, r.rpcService.Port(), command)
60 cmd.Stdout = os.Stdout
61 cmd.Stderr = os.Stderr
62
63 return cmd.Run()
64}
65
66func (r RPCService) GetMetadata(path string) (configv3.Plugin, error) {
67 err := r.Run(path, "SendMetadata")

Callers 1

GetMetadataMethod · 0.95

Calls 5

StartMethod · 0.65
StopMethod · 0.65
CommandMethod · 0.65
RunMethod · 0.65
PortMethod · 0.45

Tested by

no test coverage detected