MCPcopy Index your code
hub / github.com/docker/cli / Close

Method Close

cli/connhelper/commandconn/commandconn.go:231–243  ·  view source on GitHub ↗

Close is the net.Conn func that gets called by the transport when a dial is cancelled due to it's context timing out. Any blocked Read or Write calls will be unblocked and return errors. It will block until the underlying command has terminated.

()

Source from the content-addressed store, hash-verified

229// return errors. It will block until the underlying
230// command has terminated.
231func (c *commandConn) Close() error {
232 c.closing.Store(true)
233 defer c.closing.Store(false)
234
235 if err := c.CloseRead(); err != nil {
236 return err
237 }
238 if err := c.CloseWrite(); err != nil {
239 return err
240 }
241
242 return nil
243}
244
245func (c *commandConn) LocalAddr() net.Addr {
246 return c.localAddr

Callers 11

CloseReadMethod · 0.45
CloseWriteMethod · 0.45
ExportFunction · 0.45
importZipFunction · 0.45
TestExportImportFunction · 0.45
TestImportTarInvalidFunction · 0.45
TestImportZipFunction · 0.45
TestImportZipInvalidFunction · 0.45
TestJSONSaveWithNoFileFunction · 0.45
loadFunction · 0.45
SaveMethod · 0.45

Calls 3

CloseReadMethod · 0.95
CloseWriteMethod · 0.95
StoreMethod · 0.65

Tested by 5

TestExportImportFunction · 0.36
TestImportTarInvalidFunction · 0.36
TestImportZipFunction · 0.36
TestImportZipInvalidFunction · 0.36
TestJSONSaveWithNoFileFunction · 0.36