Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Version of the application Version = "undef" // ProjectURL is the URL of the project ProjectURL = "https://github.com/fever-ch/http-ping" )
Functions ¶
func CheckAltSvcH3 ¶ added in v1.2.2
Types ¶
type Config ¶
type Config struct { IPProtocol string Interval time.Duration Count int64 Target string Method string UserAgent string Wait time.Duration DisableKeepAlive bool LogLevel int8 ConnTarget string NoCheckCertificate bool Cookies []Cookie Headers []Header Parameters []Parameter IgnoreServerErrors bool ExtraParam bool DisableCompression bool AudibleBell bool Referrer string AuthUsername string AuthPassword string Http1 bool Http2 bool Http3 bool FullDNS bool DNSServer string CacheDNSRequests bool KeepCookies bool FollowRedirects bool Workers int Throughput bool ThroughputRefresh time.Duration TestVersion bool }
Config defines the multiple parameters which can be passed to NewHTTPPing
type Cookie ¶
type Cookie pair
Cookie is a data structure which represents the basic info about a cookie (Name and Value)
type HTTPMeasure ¶
type HTTPMeasure struct { Proto string StatusCode int Bytes int64 InBytes int64 OutBytes int64 SocketReused bool Compressed bool RemoteAddr string TLSEnabled bool TLSVersion string AltSvcH3 *string MeasuresCollection *stats.MeasuresCollection IsFailure bool FailureCause string Headers *http.Header }
HTTPMeasure is the out of a measurement done as an HTTP ping
type HTTPPing ¶
type HTTPPing interface {
Run() error
}
HTTPPing is the main class of this app, now it contains mostly UI logic
type Header ¶
type Header pair
Header is a data structure which represents the basic info about a HTTP header (Name and Value)
type Parameter ¶
type Parameter pair
Parameter is a data structure which represents a request parameter (Name and Value)
type Pinger ¶
type Pinger interface { Ping() <-chan *HTTPMeasure URL() string }
Pinger does the calls to the actual HTTP/S component
type RuntimeConfig ¶
RuntimeConfig defines the parameters which can be passed to NewPinger and NewWebClientBuilder
type WebClient ¶
type WebClient interface { DoMeasure(followRedirect bool) *HTTPMeasure GetURL() *url.URL }
WebClient represents an HTTP/S clientBuilder designed to do performance analysis
type WebClientBuilder ¶ added in v1.2.0
WebClientBuilder represents an HTTP/S clientBuilder designed to do performance analysis
func NewWebClientBuilder ¶ added in v1.2.0
func NewWebClientBuilder(config *Config, runtimeConfig *RuntimeConfig) (WebClientBuilder, error)
NewWebClientBuilder builds a new instance of webClientImpl which will provides functions for Http-Ping