Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProtocolHttp1_0 = Protocol("http1.0") ProtocolHttp1_0_tls = Protocol("http1.0-tls") ProtocolHttp1_1 = Protocol("http1.1") ProtocolHttp1_1_tls = Protocol("http1.1-tls") ProtocolH2 = Protocol("h2") ProtocolH2c = Protocol("h2c") ProtocolH3 = Protocol("h3") )
View Source
const ( SubCheckNameProtocol = "protocol" SubCheckNameSenderResponseBeforeReceiver = "sender_response_before_receiver" SubCheckNameSamePathSenderRejection = "same_path_sender_rejection" SubCheckNameContentTypeForwarding = "content_type_forwarding" SubCheckNameContentDispositionForwarding = "content_disposition_forwarding" SubCheckNameXRobotsTagNone = "x_robots_tag_none" SubCheckNameTransferred = "transferred" SubCheckNameReusePath = "reuse_path" SubCheckNamePartialTransfer = "partial_transfer" )
Subcheck name is top-level. The same subcheck names in different checks should be the same meaning.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { RunServerCmd []string HealthCheckPath string ServerSchemalessUrl string Protocol Protocol TlsSkipVerifyCert bool Concurrency uint SenderResponseBeforeReceiverTimeout time.Duration FirstByteCheckTimeout time.Duration GetResponseReceivedTimeout time.Duration GetReqWroteRequestWaitForH3 time.Duration // because httptrace not supported: https://github.com/quic-go/quic-go/issues/3342 TransferBytePerSec int SortedTransferSpans []time.Duration }
type Result ¶
type Result struct { // result name can be "<check name>.<subcheck name>" or "<check name>" Name string `json:"name"` Protocol Protocol `json:"protocol"` Message string `json:"message,omitempty"` OkForJson *bool `json:"ok,omitempty"` Errors []ResultError `json:"errors,omitempty"` Warnings []ResultWarning `json:"warnings,omitempty"` }
type ResultError ¶
type ResultError struct {
Message string `json:"message"`
}
func ContentTypeMismatchError ¶
func ContentTypeMismatchError(expectedContentType string, actualContentType string) ResultError
func FailedToGetPortError ¶
func FailedToGetPortError() ResultError
func FailedToRunServerError ¶
func FailedToRunServerError(err error) ResultError
func NewError ¶
func NewError(message string, err error) ResultError
func NotOkStatusError ¶
func NotOkStatusError(status int) ResultError
type ResultWarning ¶
type ResultWarning struct {
Message string `json:"message"`
}
func NewWarning ¶
func NewWarning(message string, err error) ResultWarning
func XRobotsTagNoneWarning ¶
func XRobotsTagNoneWarning(actualValue string) ResultWarning
type RunCheckResult ¶
type RunCheckResult struct { // empty string is ok SubCheckName string Message string Errors []ResultError Warnings []ResultWarning }
func NewRunCheckResultWithOneError ¶
func NewRunCheckResultWithOneError(resultError ResultError) RunCheckResult
Click to show internal directories.
Click to hide internal directories.