debug

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "debug"

Name of the probe

Variables

This section is empty.

Functions

func New

func New() probe.Probe

New returns a new Probe

Types

type Probe

type Probe struct {
	Answer    string `json:"answer"`     // Answer to return for assertion
	Success   bool   `json:"success"`    // Return Probe Success
	Timeout   bool   `json:"timeout"`    // Return Probe timeout
	Error     bool   `json:"error"`      // Return probe error
	ErrorCode int    `json:"error_code"` // Return a specific probe code error
	Sleep     string `json:"sleep"`      // Pause the probe to simulate a timeout

	FlipStatus          bool   `json:"flip_status"`           // The status will change over time
	FlipStatusFrequency string `json:"flip_status_frequency"` // ex: (10s, 1m, 10min)

	FlipStatusWhenTimePair string `json:"flip_status_when_time_pair"` // Status when time related to freq is pair 20h10m20s , 20h10m40s
	FlipStatusWhenTimeOdd  string `json:"flip_status_when_time_odd"`  // Status when time related to freq is odd 20h10m10s , 20h10m30s
	// contains filtered or unexported fields
}

Probe struct. Json and yaml descriptor are used for json output

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 {
	Answer    string          `json:"answer"`
	ProbeInfo probe.ProbeInfo `json:"probeinfo"`
}

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

type ProbeFail

type ProbeFail struct {
	Error        string  `json:"error"`
	VigieCode    int     `json:"fail"`
	ResponseTime float64 `json:"responsetime"` // Reference Time Unit = Second
}

ProbeFail details

Jump to

Keyboard shortcuts

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