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

Method Start

plugin/rpc/cli_rpc_server.go:104–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102}
103
104func (cli *CliRpcService) Start() error {
105 var err error
106
107 cli.stopCh = make(chan struct{})
108
109 cli.listener, err = net.Listen("tcp", "127.0.0.1:0")
110 if err != nil {
111 return err
112 }
113
114 go func() {
115 for {
116 conn, err := cli.listener.Accept()
117 if err != nil {
118 select {
119 case <-cli.stopCh:
120 return
121 default:
122 fmt.Println(err)
123 }
124 } else {
125 go cli.Server.ServeConn(conn)
126 }
127 }
128 }()
129
130 return nil
131}
132
133func (cmd *CliRpcCmd) IsMinCliVersion(passedVersion string, retVal *bool) error {
134 if version.VersionString() == version.DefaultVersion {

Callers

nothing calls this directly

Calls 2

ListenMethod · 0.65
PrintlnMethod · 0.65

Tested by

no test coverage detected