fakeBackend is a platform.Backend used to script a handshake sequence and capture every Inject call the engine makes.
| 16 | // fakeBackend is a platform.Backend used to script a handshake sequence and |
| 17 | // capture every Inject call the engine makes. |
| 18 | type fakeBackend struct { |
| 19 | ch chan platform.Packet |
| 20 | mu sync.Mutex |
| 21 | injected [][]byte |
| 22 | injectErr error |
| 23 | } |
| 24 | |
| 25 | func newFakeBackend() *fakeBackend { |
| 26 | return &fakeBackend{ch: make(chan platform.Packet, 16)} |
nothing calls this directly
no outgoing calls
no test coverage detected