Documentation ¶
Index ¶
- type LogFormatter
- type MockAddr
- type MockConn
- type MockConnBidi
- func (m *MockConnBidi) Close() error
- func (m *MockConnBidi) LocalAddr() net.Addr
- func (m *MockConnBidi) Read(b []byte) (n int, err error)
- func (m *MockConnBidi) ReadA(b []byte) (n int, err error)
- func (m *MockConnBidi) RemoteAddr() net.Addr
- func (m *MockConnBidi) Write(b []byte) (int, error)
- func (m *MockConnBidi) WriteB(b []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogFormatter ¶
type LogFormatter struct{}
LogFormatter provides a log formatter for unit tests free of timestamps
func NewLogFormatter ¶
func NewLogFormatter() *LogFormatter
NewLogFormatter creates a new log formatter
type MockConnBidi ¶
type MockConnBidi struct { net.Conn BufA *bytes.Buffer BufAMu sync.Mutex BufB *bytes.Buffer BufBMu sync.Mutex AddrA *MockAddr AddrB *MockAddr Closed bool }
MockConnBidi mock an connection
func NewMockConnBidi ¶
func NewMockConnBidi(addrA, addrB *MockAddr) *MockConnBidi
func (*MockConnBidi) Close ¶
func (m *MockConnBidi) Close() error
func (*MockConnBidi) LocalAddr ¶
func (m *MockConnBidi) LocalAddr() net.Addr
func (*MockConnBidi) RemoteAddr ¶
func (m *MockConnBidi) RemoteAddr() net.Addr
Click to show internal directories.
Click to hide internal directories.