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

Method pingCLI

plugin/cli_connection.go:112–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110}
111
112func (c *cliConnection) pingCLI() {
113 // call back to cf saying we have been setup
114 var connErr error
115 var conn net.Conn
116 for i := 0; i < 5; i++ {
117 conn, connErr = net.Dial("tcp", "127.0.0.1:"+c.cliServerPort)
118 if connErr != nil {
119 time.Sleep(200 * time.Millisecond)
120 } else {
121 conn.Close()
122 break
123 }
124 }
125 if connErr != nil {
126 fmt.Println(connErr)
127 os.Exit(1)
128 }
129}
130
131func (c *cliConnection) GetCurrentOrg() (plugin_models.Organization, error) {
132 var result plugin_models.Organization

Callers 1

StartFunction · 0.80

Calls 4

DialMethod · 0.65
CloseMethod · 0.65
PrintlnMethod · 0.65
ExitMethod · 0.65

Tested by

no test coverage detected