httplog

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package httplog implements HTTP event logging. In OONI, we use this functionality to emit pleasant logging during normal operations.

Index

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.

Jump to

Keyboard shortcuts

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