net

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoDetectProtocol added in v0.1.2

func AutoDetectProtocol(inputURL string) string

func GetSSLCertExpiry

func GetSSLCertExpiry(siteUrl string) int

func TryHTTPSConnection added in v0.1.2

func TryHTTPSConnection(urlString string) (*http.Response, error)

Types

type HttpTraceInfo

type HttpTraceInfo struct {
	Wait             time.Duration
	DNSLookup        time.Duration
	TCPConnection    time.Duration
	TimeToFirstByte  time.Duration
	DownloadDuration time.Duration
}

type NetworkConfig added in v0.0.7

type NetworkConfig struct {
	Timeout         time.Duration
	ShouldFail      bool
	FollowRedirects bool
	SkipSSL         bool
	AssertText      string
	RefreshInterval time.Duration
}

type WebsiteCheckResult added in v0.0.7

type WebsiteCheckResult struct {
	URL             string
	IsUp            bool
	ResponseTime    time.Duration
	TraceInfo       *HttpTraceInfo
	AssertionPassed bool
	LastCheckTime   time.Time
	AssertText      string
}

func CheckWebsite

func CheckWebsite(url string, config NetworkConfig) WebsiteCheckResult

Jump to

Keyboard shortcuts

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