MCPcopy Create free account
hub / github.com/SamNet-dev/snix / fakeBackend

Struct fakeBackend

core/engine/engine_test.go:18–23  ·  view source on GitHub ↗

fakeBackend is a platform.Backend used to script a handshake sequence and capture every Inject call the engine makes.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected