Documentation ¶
Index ¶
- func AssertIncomingErrorArrived(fromCh <-chan error, expected string)
- func AssertMessageArrived(fromCh <-chan sip.Message, expectedMessage string, expectedSource string, ...) sip.Message
- func CreateClient(network string, raddr string, laddr string) net.Conn
- func CreatePacketClientServer(network string, addr string) (net.Conn, net.Conn)
- func CreateStreamClientServer(network string, addr string) (net.Conn, net.Conn)
- func Message(rawMsg []string) sip.Message
- func NewLogrusLogger() *log.LogrusLogger
- func Request(rawMsg []string) sip.Request
- func Response(rawMsg []string) sip.Response
- func WriteToConn(conn net.Conn, data []byte)
- type MockAddr
- type MockConn
- type MockListener
- type MockTransportLayer
- func (tpl *MockTransportLayer) Cancel()
- func (tpl *MockTransportLayer) Done() <-chan struct{}
- func (tpl *MockTransportLayer) Errors() <-chan error
- func (tpl *MockTransportLayer) Host() string
- func (tpl *MockTransportLayer) IsReliable(network string) bool
- func (tpl *MockTransportLayer) Listen(network string, addr string) error
- func (tpl *MockTransportLayer) Log() log.Logger
- func (tpl *MockTransportLayer) Messages() <-chan sip.Message
- func (tpl *MockTransportLayer) Send(msg sip.Message) error
- func (tpl *MockTransportLayer) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertMessageArrived ¶
func NewLogrusLogger ¶
func NewLogrusLogger() *log.LogrusLogger
func WriteToConn ¶
Types ¶
type MockAddr ¶
TODO implement with channels, all methods to replace net.Pipe in connection_pool_test.go
type MockConn ¶
func (*MockConn) RemoteAddr ¶
type MockListener ¶
type MockListener struct {
// contains filtered or unexported fields
}
func NewMockListener ¶
func NewMockListener(addr net.Addr) *MockListener
func (*MockListener) Addr ¶
func (ls *MockListener) Addr() net.Addr
func (*MockListener) Close ¶
func (ls *MockListener) Close() error
type MockTransportLayer ¶
type MockTransportLayer struct { InMsgs chan sip.Message InErrs chan error OutMsgs chan sip.Message // contains filtered or unexported fields }
func NewMockTransportLayer ¶
func NewMockTransportLayer() *MockTransportLayer
func (*MockTransportLayer) Cancel ¶
func (tpl *MockTransportLayer) Cancel()
func (*MockTransportLayer) Done ¶
func (tpl *MockTransportLayer) Done() <-chan struct{}
func (*MockTransportLayer) Errors ¶
func (tpl *MockTransportLayer) Errors() <-chan error
func (*MockTransportLayer) Host ¶
func (tpl *MockTransportLayer) Host() string
func (*MockTransportLayer) IsReliable ¶
func (tpl *MockTransportLayer) IsReliable(network string) bool
func (*MockTransportLayer) Listen ¶
func (tpl *MockTransportLayer) Listen(network string, addr string) error
func (*MockTransportLayer) Log ¶
func (tpl *MockTransportLayer) Log() log.Logger
func (*MockTransportLayer) Messages ¶
func (tpl *MockTransportLayer) Messages() <-chan sip.Message
func (*MockTransportLayer) String ¶
func (tpl *MockTransportLayer) String() string
Click to show internal directories.
Click to hide internal directories.