v0.0.0-...-74dfc27 Latest Latest

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 19 Imported by: 0




View Source
const (
	ErrorInvalidEndpoint           ErrorType = "endpointInvalid"
	ErrorTypeServerTooSlow                   = "serverTooSlow"
	ErrorTypeNotImplemented                  = "notImplemented"
	ErrorTypeUnknownError                    = "unknownError"
	ErrorTypeClientError                     = "clientError"
	ErrorTypeDNS                             = "dns"
	ErrorTypeDNSConfig                       = "dnsConfig"
	ErrorTypeTLSCertificateInvalid           = "tlsCertificateInvalid"
	ErrorTypeTLSHostNameError                = "tlsHostNameError"
	ErrorTypeTLSSystemRootsError             = "tlsSystemRootsError"
	ErrorTypeTLSUnknownAuthority             = "tlsUnknownAutority"
	ErrorTypeWrongHTTPStatusCode             = "wrongHTTPStatus"
	ErrorTypeCertificateIsExpiring           = "certificateIsExpiring"
	ErrorTypeUnexpectedContentType           = "unexpectedContentType"
	ErrorTypeSessionFail                     = "sessionFail"
	ErrorTypeGoQueryMismatch                 = "goqueryMismatch"
	ErrorTypeGoQuery                         = "goQueryGeneralError"
	ErrorTypeDataMismatch                    = "dataMismatch"
	ErrorJsonPath                            = "jsonPathError"
	ErrorRegex                               = "regexError"
	ErrorBadResponseBody                     = "badResponseBody"



This section is empty.


type CheckContext

type CheckContext struct {
	// contains filtered or unexported fields

type Error

type Error struct {
	Error   string    `json:"error"`
	Type    ErrorType `json:"type"`
	Comment string    `json:"comment,omitempty"`

func ValidateContentType

func ValidateContentType(ctx *CheckContext) (errs []Error)

func ValidateDuration

func ValidateDuration(ctx *CheckContext) (errs []Error)

func ValidateGoQuery

func ValidateGoQuery(ctx *CheckContext) (errs []Error)

func ValidateJsonPath

func ValidateJsonPath(ctx *CheckContext) (errs []Error)

func ValidateRegex

func ValidateRegex(ctx *CheckContext) (errs []Error)

type ErrorType

type ErrorType string

type Result

type Result struct {
	ID        string        `json:"id"`
	Errors    []Error       `json:"errors"`
	Timeout   bool          `json:"timeout"`
	Timestamp time.Time     `json:"timestamp"`
	RunTime   time.Duration `json:"runtime"`

func NewResult

func NewResult(id string) *Result

type ValidatorFunc

type ValidatorFunc func(ctx *CheckContext) (errs []Error)

type Watcher

type Watcher struct {
	// contains filtered or unexported fields

func Watch

func Watch(service *config.Service, chanResult chan Result) *Watcher

Watch create a watcher and start watching

func (*Watcher) Stop

func (w *Watcher) Stop()

Stop watching - beware this is async

Jump to

Keyboard shortcuts

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