Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorTransactionNameMissing = errors.New("transaction name is missing") ErrorTransactionChecksMissing = errors.New("transaction checks are missing") )
Transaction Errors
View Source
var ( ErrorCheckNameMissing = errors.New("check name is missing") ErrorCheckURLMissing = errors.New("check url is missing") ErrorCheckURLInvalid = errors.New("check url is invalid") ErrorCheckInvalidMethod = errors.New("check method is invalid") ErrorCheckAssertionsMissing = errors.New("check assertions are missing") )
EndpointCheck Errors
View Source
var (
ErrorNotImplemented = errors.New("not implemented")
)
General Errors
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct { Name string `yaml:"name"` Type AssertionType `yaml:"type"` Value string `yaml:"value"` }
func (*Assertion) AssertResult ¶
func (a *Assertion) AssertResult(result *EndpointCheckResult) (success bool, err error)
type AssertionType ¶
type AssertionType string
const ( AssertionTypeStatusCode AssertionType = "status_code" AssertionTypeBody AssertionType = "body" )
type Config ¶
type Config struct { Version string `yaml:"version"` Name string `yaml:"name"` Execute ExecuteType `yaml:"execute"` Sleep int `yaml:"sleep"` Transactions []Transaction `yaml:"transactions"` Outputs []Output `yaml:"outputs"` }
type EndpointCheck ¶
type EndpointCheck struct { Name string `yaml:"name"` URL string `yaml:"url"` Method Method `yaml:"method"` Headers map[string]string `yaml:"headers"` Body string `yaml:"body"` Timeout int `yaml:"timeout"` Assertions []Assertion `yaml:"assertions"` }
func (*EndpointCheck) AssertResult ¶
func (c *EndpointCheck) AssertResult(result *EndpointCheckResult) (success bool, err error)
func (*EndpointCheck) Validate ¶
func (c *EndpointCheck) Validate() error
type EndpointCheckResult ¶
type EndpointCheckResult struct { Name string StatusCode int URL string Error string Body []byte Headers map[string][]string DNSDuration time.Duration TLSHandshakeDuration time.Duration ConnectDuration time.Duration FirstByteDuration time.Duration TotalDuration time.Duration // Will only be set after successfull assertion Success bool }
type ExecuteType ¶
type ExecuteType string
const ( ExecuteTypeOnce ExecuteType = "once" ExecuteTypeLoop ExecuteType = "loop" )
type OutputType ¶
type OutputType string
const ( OutputTypeStdOut OutputType = "stdout" OutputTypeInfluxDB OutputType = "influxdb" )
type Result ¶
type Result struct { Name string TransactionResults []TransactionResult }
type Transaction ¶
type Transaction struct { Name string `yaml:"name"` Checks []EndpointCheck `yaml:"checks"` }
func (*Transaction) Validate ¶
func (t *Transaction) Validate() error
type TransactionResult ¶
type TransactionResult struct { Name string Success bool EndpointCheckResults []EndpointCheckResult }
Click to show internal directories.
Click to hide internal directories.