MCPcopy
hub / github.com/docker/docker-agent / fakeSession

Struct fakeSession

pkg/tools/lifecycle/supervisor_test.go:20–28  ·  view source on GitHub ↗

fakeSession is a controllable session: its Wait blocks until either Close is called or fail is invoked.

Source from the content-addressed store, hash-verified

18// fakeSession is a controllable session: its Wait blocks until either
19// Close is called or fail is invoked.
20type fakeSession struct {
21 mu sync.Mutex
22 closed bool
23 closedCh chan struct{} // closed once Close has run
24 waitDone atomic.Bool // set true after Wait returns
25 waiting chan struct{} // closed once Wait has parked on failCh
26 waitOnce sync.Once
27 failCh chan error
28}
29
30func newFakeSession() *fakeSession {
31 return &fakeSession{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected