probe

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

README

Executors

Documentation

How to write an Executor ?

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ADVGetIPsfromHostname

func ADVGetIPsfromHostname(host string, ipv int) ([]string, error)

ADVGetIPsfromHostname returns a array of IPs resolved by a Hostname Ipv4 or Ipv6 This func must be divided WIP

func ADVGetIPsfromHostname_port

func ADVGetIPsfromHostname_port(host string, port int, ipv int) ([]string, error)

ADVGetIPsfromHostname_port returns a array of IPs resolved by a Hostname Ipv4 or Ipv6 This func must be divided WIP

func GetIPsfromHostname

func GetIPsfromHostname(host string, port int) ([]string, error)

func ToMap

func ToMap(proberes interface{}) (map[string]interface{}, error)

Types

type Probe

type Probe interface {
	// Start run a Step TStep
	Run(timeout time.Duration) []ProbeReturn
	GetName() string
	Initialize(StepProbe) error
	GenerateTStepName() string
}

Probe execute a testStep.

type ProbeInfo

type ProbeInfo struct {
	Error        string        `json:"error"`
	Status       Status        `json:"status"`
	ProbeCode    int           `json:"probecode"`
	ResponseTime time.Duration `json:"responsetime"`
	SubTest      string        `json:"subtest"`
}

ProbeInfo details DO NOT EDIT

func MixPIs

func MixPIs(pis []*ProbeInfo) ProbeInfo

type ProbeResult

type ProbeResult map[string]interface{}

type ProbeReturn

type ProbeReturn struct {
	Res    ProbeResult
	Err    string
	Status Status
}

ProbeReturn represents an probe result on a test step

type Status

type Status int
const (
	Success Status = 1
	Timeout Status = -2
	Error   Status = -3
)

type StepProbe

type StepProbe map[string]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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