dummy

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 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 added in v0.7.4

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 added in v0.7.4

func (c *CircularClient) Close() error

func (*CircularClient) OneTime added in v0.7.4

func (c *CircularClient) OneTime() *CircularClient

func (*CircularClient) Read added in v0.7.4

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

func (*CircularClient) Remote added in v0.7.4

func (*CircularClient) Remote() net.Addr

func (*CircularClient) Unread added in v0.7.4

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

func (*CircularClient) Write added in v0.7.4

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

type NopConn added in v0.14.0

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 added in v0.14.0

func (NopConn) Close() error

func (NopConn) LocalAddr added in v0.14.0

func (NopConn) LocalAddr() net.Addr

func (NopConn) Read added in v0.14.0

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

func (NopConn) RemoteAddr added in v0.14.0

func (NopConn) RemoteAddr() net.Addr

func (NopConn) SetDeadline added in v0.14.0

func (NopConn) SetDeadline(time.Time) error

func (NopConn) SetReadDeadline added in v0.14.0

func (NopConn) SetReadDeadline(time.Time) error

func (NopConn) SetWriteDeadline added in v0.14.0

func (NopConn) SetWriteDeadline(time.Time) error

func (NopConn) Write added in v0.14.0

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

type SinkholeWriter added in v0.14.0

type SinkholeWriter struct {
	Data []byte
}

func NewSinkholeWriter added in v0.14.0

func NewSinkholeWriter() *SinkholeWriter

func (*SinkholeWriter) Write added in v0.14.0

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