dummy

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNopClient

func NewNopClient() tcp.Client

Types

type CircularClient

type CircularClient struct {
	// contains filtered or unexported fields
}

CircularClient is a client that on every read-operation returns the same data as it was initialised with. This is used mainly for benchmarking

func NewCircularClient

func NewCircularClient(data ...[]byte) *CircularClient

func (*CircularClient) Close

func (c *CircularClient) Close() error

func (*CircularClient) Conn

func (c *CircularClient) Conn() net.Conn

func (*CircularClient) OneTime

func (c *CircularClient) OneTime() *CircularClient

func (*CircularClient) Read

func (c *CircularClient) Read() (data []byte, err error)

func (*CircularClient) Remote

func (*CircularClient) Remote() net.Addr

func (*CircularClient) Unread

func (c *CircularClient) Unread(takeback []byte)

func (*CircularClient) Write

func (*CircularClient) Write([]byte) error

type NopConn

type NopConn struct{}

NopConn is used to bypass a connection object, that does absolutely nothing. It exists just in order to be passed where written data isn't the point

func NewNopConn

func NewNopConn() *NopConn

func (NopConn) Close

func (NopConn) Close() error

func (NopConn) LocalAddr

func (NopConn) LocalAddr() net.Addr

func (NopConn) Read

func (NopConn) Read([]byte) (n int, err error)

func (NopConn) RemoteAddr

func (NopConn) RemoteAddr() net.Addr

func (NopConn) SetDeadline

func (NopConn) SetDeadline(time.Time) error

func (NopConn) SetReadDeadline

func (NopConn) SetReadDeadline(time.Time) error

func (NopConn) SetWriteDeadline

func (NopConn) SetWriteDeadline(time.Time) error

func (NopConn) Write

func (NopConn) Write([]byte) (n int, err error)

type SinkholeWriter

type SinkholeWriter struct {
	Data []byte
}

func NewSinkholeWriter

func NewSinkholeWriter() *SinkholeWriter

func (*SinkholeWriter) Write

func (s *SinkholeWriter) Write(b []byte) error

Jump to

Keyboard shortcuts

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