Documentation
¶
Index ¶
Constants ¶
View Source
const MaxAcceptableBodySize = 1 << 24
MaxAcceptableBodySize is the maximum acceptable body size for incoming API requests as well as when we're measuring webpages.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// BaseLogger is the MANDATORY logger to use.
BaseLogger model.Logger
// Indexer is the MANDATORY atomic integer used to assign an index to requests.
Indexer *atomic.Int64
// MaxAcceptableBody is the MANDATORY maximum acceptable response body.
MaxAcceptableBody int64
// Measure is the MANDATORY function that the handler should call
// for producing a response for a valid incoming request.
Measure func(ctx context.Context, config *Handler, creq *model.THRequest) (*model.THResponse, error)
// NewDialer is the MANDATORY factory to create a new Dialer.
NewDialer func(model.Logger) model.Dialer
// NewHTTPClient is the MANDATORY factory to create a new HTTPClient.
NewHTTPClient func(model.Logger) model.HTTPClient
// NewHTTP3Client is the MANDATORY factory to create a new HTTP3Client.
NewHTTP3Client func(model.Logger) model.HTTPClient
// NewQUICDialer is the MANDATORY factory to create a new QUICDialer.
NewQUICDialer func(model.Logger) model.QUICDialer
// NewResolver is the MANDATORY factory for creating a new resolver.
NewResolver func(model.Logger) model.Resolver
// NewTLSHandshaker is the MANDATORY factory for creating a new TLS handshaker.
NewTLSHandshaker func(model.Logger) model.TLSHandshaker
}
Handler is an http.Handler implementing the Web Connectivity test helper HTTP API.
Click to show internal directories.
Click to hide internal directories.