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

Method withClientDo

plugin/cli_connection.go:24–32  ·  view source on GitHub ↗
(f func(client *rpc.Client) error)

Source from the content-addressed store, hash-verified

22}
23
24func (c *cliConnection) withClientDo(f func(client *rpc.Client) error) error {
25 client, err := rpc.Dial("tcp", "127.0.0.1:"+c.cliServerPort)
26 if err != nil {
27 return err
28 }
29 defer client.Close()
30
31 return f(client)
32}
33
34func (c *cliConnection) sendPluginMetadataToCliServer(metadata PluginMetadata) {
35 var success bool

Callers 15

isMinCliVersionMethod · 0.95
callCliCommandMethod · 0.95
GetCurrentOrgMethod · 0.95
GetCurrentSpaceMethod · 0.95
UsernameMethod · 0.95
UserGuidMethod · 0.95
UserEmailMethod · 0.95
IsSSLDisabledMethod · 0.95
IsLoggedInMethod · 0.95
HasOrganizationMethod · 0.95
HasSpaceMethod · 0.95

Calls 2

DialMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected