Documentation ¶
Index ¶
- func FuncCloser(r io.Reader, closer func() error) io.ReadCloser
- func NewTracedConnection(conn net.Conn) net.Conn
- type LoggedConnection
- func (conn LoggedConnection) Close() error
- func (conn LoggedConnection) Read(b []byte) (n int, err error)
- func (conn LoggedConnection) SetDeadline(t time.Time) error
- func (conn LoggedConnection) SetReadDeadline(t time.Time) error
- func (conn LoggedConnection) SetWriteDeadline(t time.Time) error
- func (conn LoggedConnection) Write(b []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FuncCloser ¶
func FuncCloser(r io.Reader, closer func() error) io.ReadCloser
FuncCloser turns an io.Reader into an io.ReadCloser by calling a supplied function on Close.
Types ¶
type LoggedConnection ¶
LoggedConnection is a net.Conn helper which logs all call activity. It is useful for debugging packages with opaque connection handling paths, as poller_exporter leans heavily on incremental construction of net.Conn sessions.
func (LoggedConnection) Close ¶
func (conn LoggedConnection) Close() error
func (LoggedConnection) SetDeadline ¶
func (conn LoggedConnection) SetDeadline(t time.Time) error
func (LoggedConnection) SetReadDeadline ¶
func (conn LoggedConnection) SetReadDeadline(t time.Time) error
func (LoggedConnection) SetWriteDeadline ¶
func (conn LoggedConnection) SetWriteDeadline(t time.Time) error
Click to show internal directories.
Click to hide internal directories.