Documentation ¶
Index ¶
- func NewNopClient() tcp.Client
- type CircularClient
- type NopConn
- func (NopConn) Close() error
- func (NopConn) LocalAddr() net.Addr
- func (NopConn) Read([]byte) (n int, err error)
- func (NopConn) RemoteAddr() net.Addr
- func (NopConn) SetDeadline(time.Time) error
- func (NopConn) SetReadDeadline(time.Time) error
- func (NopConn) SetWriteDeadline(time.Time) error
- func (NopConn) Write([]byte) (n int, err error)
- type SinkholeWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNopClient ¶
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) RemoteAddr ¶ added in v0.14.0
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
Click to show internal directories.
Click to hide internal directories.