http

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: GPL-3.0 Imports: 21 Imported by: 0

README

// Possible certificate files; stop after finding one.
var certFiles = []string{
	"/etc/ssl/certs/ca-certificates.crt",                // Debian/Ubuntu/Gentoo etc.
	"/etc/pki/tls/certs/ca-bundle.crt",                  // Fedora/RHEL 6
	"/etc/ssl/ca-bundle.pem",                            // OpenSUSE
	"/etc/pki/tls/cacert.pem",                           // OpenELEC
	"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // CentOS/RHEL 7
}

Source: https://golang.org/src/crypto/x509/root_linux.go

Documentation

Index

Constants

View Source
const Name = "http"

Name of the probe

Variables

This section is empty.

Functions

func New

func New() probe.Probe

New returns a new Probe

Types

type Headers

type Headers map[string]string

Headers represents header HTTP for Request

type Probe

type Probe struct {
	Method            string  `json:"method"`  // Optional (GET, POST...) RFC 7231 section 4.3. (PATCH RFC 5789) Default=GET
	Version           int     `json:"version"` // Optional (1.0, 1.1, 2.0) Default=1.1
	URL               string  `json:"url"`     // Full url http://fqdn.tld/path
	Body              string  `json:"body"`
	BodyFile          string  `json:"bodyfile"`
	Headers           Headers `json:"headers"`
	IgnoreVerifySSL   bool    `json:"ignore_verify_ssl"`   // Optional Default=false
	BasicAuthUser     string  `json:"basic_auth_user"`     // Optional BasicAuth User
	BasicAuthPassword string  `json:"basic_auth_password"` // Optional BasicAuth Password
	FollowRedirects   bool    `json:"follow_redirects"`
	IpVersion         int     `json:"ip_version"` // Optional Resolve IPv4, IPv6, or Both (default 0=both)
	Proxy             string  `json:"proxy"`
	// contains filtered or unexported fields
}

Probe struct : Informations necessaires à l'execution de la probe All attributes must be Public

func (*Probe) GenerateTStepName

func (p *Probe) GenerateTStepName() string

GenerateTStepName return a tstep name if non existent

func (Probe) GetName

func (Probe) GetName() string

Return Probe Name

func (*Probe) Initialize

func (p *Probe) Initialize(step probe.StepProbe) error

Initialize Probe struct data

func (*Probe) Run

func (p *Probe) Run(timeout time.Duration) (probeReturns []probe.ProbeReturn)

Start the probe request

type ProbeAnswer

type ProbeAnswer struct {
	ProbeInfo     probe.ProbeInfo `json:"probeinfo"`
	HTTPcode      int             `json:"httpcode" `
	Body          string          `json:"body"`
	BodyJSON      interface{}     `json:"bodyjson"`
	Headers       Headers         `json:"headers"`
	ResponsesTime responsestime   `json:"responses_time"`
}

ProbeAnswer is the returned result after query All attributes must be Public ProbeInfo is Mandatory => Détail l'execution de la probe

Jump to

Keyboard shortcuts

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