probe

package
v0.0.0-...-de99731 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RespStatus = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "response_code",
		Help: "Count different responses",
	}, []string{"url", "response_code"})
)

Functions

func TimeUrl

func TimeUrl(url string, c *TimedClient)

Types

type ApiHandler

type ApiHandler struct {
	// contains filtered or unexported fields
}

func GetApiHandler

func GetApiHandler(urls *[]string, urlsUpdateChan chan []string, urlAddChan chan string) *ApiHandler

func (*ApiHandler) Router

func (a *ApiHandler) Router() *mux.Router

type ConnectionTimes

type ConnectionTimes struct {
	Dns          time.Duration
	Connect      time.Duration
	TlsHandshake time.Duration
	FirstByte    time.Duration
	Total        time.Duration
}

type ReqResponse

type ReqResponse struct {
	Status    int
	Durations *ConnectionTimes
}

type TimedClient

type TimedClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(keepalive bool, maxConn int, hostConn int) *TimedClient

func (*TimedClient) Get

func (c *TimedClient) Get(url string) ReqResponse

Jump to

Keyboard shortcuts

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