wstest

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCleanConn

type MockCleanConn struct {
	Conn       io.ReadWriteCloser
	CleanedUp  bool
	CleanupErr error
}

func (MockCleanConn) CleanUp

func (m MockCleanConn) CleanUp(uid string) error

func (MockCleanConn) GetConnection

func (m MockCleanConn) GetConnection() io.ReadWriteCloser

type MockDialer

type MockDialer struct {
	Conn *websocket.Conn
	Resp *http.Response
	Err  error
}

func (MockDialer) Dial

func (m MockDialer) Dial(urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error)

type MockHappyConnection

type MockHappyConnection struct {
	Written []byte
	Msg     []byte
}

func (*MockHappyConnection) Read

func (m *MockHappyConnection) Read(ctx context.Context, msgCh chan []byte)

func (*MockHappyConnection) Write

func (m *MockHappyConnection) Write(b []byte) error

type MockRWCloser

type MockRWCloser struct{}

func (MockRWCloser) Close

func (rw MockRWCloser) Close() error

func (MockRWCloser) Read

func (rw MockRWCloser) Read(p []byte) (n int, err error)

func (MockRWCloser) Write

func (rw MockRWCloser) Write(p []byte) (n int, err error)

type MockUnhappyConnection

type MockUnhappyConnection struct {
	Written []byte
	Msg     []byte
}

func (*MockUnhappyConnection) Read

func (m *MockUnhappyConnection) Read(ctx context.Context, msgCh chan []byte)

func (*MockUnhappyConnection) Write

func (m *MockUnhappyConnection) Write(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL