Documentation
¶
Overview ¶
Package httplog implements HTTP event logging. In OONI, we use this functionality to emit pleasant logging during normal operations.
Index ¶
- type RoundTripLogger
- func (rtl *RoundTripLogger) ConnectDone(network, addr string, err error)
- func (rtl *RoundTripLogger) ConnectStart(network, addr string)
- func (rtl *RoundTripLogger) ConnectionReady(conn net.Conn)
- func (rtl *RoundTripLogger) DNSDone(addrs []net.IPAddr, err error)
- func (rtl *RoundTripLogger) DNSStart(host string)
- func (rtl *RoundTripLogger) GotFirstResponseByte()
- func (rtl *RoundTripLogger) GotHeaders(response *http.Response)
- func (rtl *RoundTripLogger) TLSHandshakeDone(state tls.ConnectionState, err error)
- func (rtl *RoundTripLogger) TLSHandshakeStart()
- func (rtl *RoundTripLogger) WroteHeaderField(key string, values []string)
- func (rtl *RoundTripLogger) WroteHeaders(request *http.Request)
- func (rtl *RoundTripLogger) WroteRequest(err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoundTripLogger ¶
type RoundTripLogger struct {
// Logger is the logs emitter.
Logger log.Logger
// contains filtered or unexported fields
}
RoundTripLogger is a httptracex.Handler that logs events.
func (*RoundTripLogger) ConnectDone ¶
func (rtl *RoundTripLogger) ConnectDone(network, addr string, err error)
ConnectDone is called after connect.
func (*RoundTripLogger) ConnectStart ¶
func (rtl *RoundTripLogger) ConnectStart(network, addr string)
ConnectStart is called when we start connecting.
func (*RoundTripLogger) ConnectionReady ¶
func (rtl *RoundTripLogger) ConnectionReady(conn net.Conn)
ConnectionReady is called when a connection is ready to be used.
func (*RoundTripLogger) DNSDone ¶
func (rtl *RoundTripLogger) DNSDone(addrs []net.IPAddr, err error)
DNSDone is called after name resolution.
func (*RoundTripLogger) DNSStart ¶
func (rtl *RoundTripLogger) DNSStart(host string)
DNSStart is called when we start name resolution.
func (*RoundTripLogger) GotFirstResponseByte ¶
func (rtl *RoundTripLogger) GotFirstResponseByte()
GotFirstResponseByte is called when we start reading the response.
func (*RoundTripLogger) GotHeaders ¶
func (rtl *RoundTripLogger) GotHeaders(response *http.Response)
GotHeaders is called when we've got the response headers.
func (*RoundTripLogger) TLSHandshakeDone ¶
func (rtl *RoundTripLogger) TLSHandshakeDone( state tls.ConnectionState, err error, )
TLSHandshakeDone is called after the TLS handshake.
func (*RoundTripLogger) TLSHandshakeStart ¶
func (rtl *RoundTripLogger) TLSHandshakeStart()
TLSHandshakeStart is called when we start the TLS handshake.
func (*RoundTripLogger) WroteHeaderField ¶
func (rtl *RoundTripLogger) WroteHeaderField(key string, values []string)
WroteHeaderField is called when a header field is written.
func (*RoundTripLogger) WroteHeaders ¶
func (rtl *RoundTripLogger) WroteHeaders(request *http.Request)
WroteHeaders is called when all headers are written.
func (*RoundTripLogger) WroteRequest ¶
func (rtl *RoundTripLogger) WroteRequest(err error)
WroteRequest is called after the request has been written.