checks

package
v1.0.259 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 114 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFileName = "test.txt"
)
View Source
const SizeNotSupported = -1
View Source
const WebhookCheckType = "webhook"

Variables

View Source
var DefaultArtifactConnection string

DefaultArtifactConnection is the connection that's used to save all check artifacts.

View Source
var DisabledChecks []string
View Source
var PRIVILEGED = os.Getenv("PING_MODE") == "privileged"

Functions

func CheckGCSBucket added in v0.38.49

func CheckGCSBucket(ctx *context.Context, check v1.FolderCheck) pkg.Results

func CheckS3Bucket added in v0.38.49

func CheckS3Bucket(ctx *context.Context, check v1.FolderCheck) pkg.Results

func CheckSFTP added in v0.38.161

func CheckSFTP(ctx *context.Context, check v1.FolderCheck) pkg.Results

func CheckSQL added in v0.19.2

func CheckSQL(ctx *context.Context, checker SQLChecker) pkg.Results

CheckSQL : Attempts to connect to a DB using the specified

driver and connection string

Returns check result and metrics

func CheckSmb added in v0.38.49

func CheckSmb(ctx *context.Context, check v1.FolderCheck) pkg.Results

func Error added in v0.33.1

func Error(check external.Check, err error) *pkg.CheckResult

func Exec added in v1.0.152

func Exec(ctx *context.Context) ([]*pkg.CheckResult, error)

Exec runs the actions specified and returns the results, without exporting any metrics

func ExportCheckMetrics added in v1.0.85

func ExportCheckMetrics(ctx *context.Context, results pkg.Results)

func FailDatabaseBackupParse added in v0.38.88

func FailDatabaseBackupParse(ctx *context.Context, check v1.DatabaseBackupCheck) pkg.Results

func Failf

func Failf(check external.Check, msg string, args ...interface{}) *pkg.CheckResult

func GCPDatabaseBackupCheck added in v0.38.88

func GCPDatabaseBackupCheck(ctx *context.Context, check v1.DatabaseBackupCheck) pkg.Results

func GetAWSConfig added in v0.38.300

func GetAWSConfig(ctx *context.Context, conn connection.AWSConnection) (cfg aws.Config, err error)

func GetDeadline added in v0.38.21

func GetDeadline(canary v1.Canary) time.Time

func HandleFail added in v0.33.0

func HandleFail(check v1.EC2Check, message string) pkg.Results

func Passf

func Passf(check external.Check, msg string, args ...interface{}) *pkg.CheckResult

func ProcessResults added in v1.0.85

func ProcessResults(ctx *context.Context, results []*pkg.CheckResult) []*pkg.CheckResult

func RunChecks added in v0.33.0

func RunChecks(ctx *context.Context) ([]*pkg.CheckResult, error)

func Success added in v0.11.4

func Success(check external.Check, start time.Time) *pkg.CheckResult

func Successf added in v0.21.0

func Successf(check external.Check, start time.Time, textResults bool, msg string, args ...interface{}) *pkg.CheckResult

func TextFailf added in v0.21.0

func TextFailf(check external.Check, textResults bool, msg string, args ...interface{}) *pkg.CheckResult

TextFailf used for failure in case of text based results

func TransformResults added in v1.0.85

func TransformResults(ctx *context.Context, in []*pkg.CheckResult) (out []*pkg.CheckResult)

Types

type AWS added in v0.33.1

type AWS struct {
	EC2    *ec2.Client
	Config aws.Config
	// contains filtered or unexported fields
}

func NewAWS added in v0.33.1

func NewAWS(ctx *context.Context, check v1.EC2Check) (*AWS, error)

func (*AWS) Describe added in v0.33.1

func (cfg *AWS) Describe(instanceID string, timeout time.Duration) (internalIP string, internalDNS string, err error)

func (*AWS) GetAMI added in v0.33.1

func (cfg *AWS) GetAMI(check v1.EC2Check) (*string, error)

func (*AWS) GetExistingInstanceIds added in v0.33.1

func (cfg *AWS) GetExistingInstanceIds(idString string) ([]string, error)

func (*AWS) Launch added in v0.33.1

func (cfg *AWS) Launch(ctx *context.Context, check v1.EC2Check, name, ami string) (string, *time.Duration, error)

func (*AWS) TerminateInstances added in v0.33.1

func (cfg *AWS) TerminateInstances(instanceIds []string, timeout time.Duration) (*time.Duration, error)

type AlertManagerChecker added in v0.38.218

type AlertManagerChecker struct{}

func (*AlertManagerChecker) Check added in v0.38.218

func (c *AlertManagerChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*AlertManagerChecker) Run added in v0.38.218

func (*AlertManagerChecker) Type added in v0.38.218

func (c *AlertManagerChecker) Type() string

type AwsConfigChecker added in v0.38.56

type AwsConfigChecker struct {
}

func (*AwsConfigChecker) Check added in v0.38.56

func (c *AwsConfigChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*AwsConfigChecker) Run added in v0.38.56

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*AwsConfigChecker) Type added in v0.38.56

func (c *AwsConfigChecker) Type() string

Type: returns checker type

type AwsConfigRuleChecker added in v0.38.75

type AwsConfigRuleChecker struct {
}

func (*AwsConfigRuleChecker) Check added in v0.38.75

func (c *AwsConfigRuleChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*AwsConfigRuleChecker) Run added in v0.38.75

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*AwsConfigRuleChecker) Type added in v0.38.75

func (c *AwsConfigRuleChecker) Type() string

Type: returns checker type

type AzureDevopsChecker added in v0.38.271

type AzureDevopsChecker struct {
}

func (*AzureDevopsChecker) Run added in v0.38.271

func (*AzureDevopsChecker) Type added in v0.38.271

func (t *AzureDevopsChecker) Type() string

type CatalogChecker added in v1.0.250

type CatalogChecker struct{}

func (*CatalogChecker) Check added in v1.0.250

func (*CatalogChecker) Run added in v1.0.250

func (*CatalogChecker) Type added in v1.0.250

func (c *CatalogChecker) Type() string

type Checker

type Checker interface {
	Run(ctx *context.Context) pkg.Results
	Type() string
}

type Checks added in v0.38.4

type Checks []external.Check

func (Checks) Includes added in v0.38.4

func (c Checks) Includes(checker Checker) bool

type CloudWatchChecker added in v0.38.31

type CloudWatchChecker struct {
}

func (*CloudWatchChecker) Check added in v0.38.31

func (c *CloudWatchChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*CloudWatchChecker) Run added in v0.38.31

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*CloudWatchChecker) Type added in v0.38.31

func (c *CloudWatchChecker) Type() string

Type: returns checker type

type ConfigDBQueryColumn added in v0.38.90

type ConfigDBQueryColumn struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type ConfigDBQueryResult added in v0.38.90

type ConfigDBQueryResult struct {
	Count   int                      `json:"count"`
	Columns []ConfigDBQueryColumn    `json:"columns"`
	Results []map[string]interface{} `json:"results"`
}

type ConfigdbChecker added in v0.38.90

type ConfigdbChecker struct{}

func (*ConfigdbChecker) Check added in v0.38.90

func (c *ConfigdbChecker) Check(ctx *canaryContext.Context, extConfig external.Check) pkg.Results

func (*ConfigdbChecker) Run added in v0.38.90

func (*ConfigdbChecker) Type added in v0.38.90

func (c *ConfigdbChecker) Type() string

type DNSChecker

type DNSChecker struct{}

func (*DNSChecker) Check

func (c *DNSChecker) Check(ctx *canaryContext.Context, extConfig external.Check) pkg.Results

func (*DNSChecker) Run

func (*DNSChecker) Type

func (c *DNSChecker) Type() string

Type: returns checker type

type DatabaseBackupChecker added in v0.38.88

type DatabaseBackupChecker struct {
}

func (*DatabaseBackupChecker) Check added in v0.38.88

func (c *DatabaseBackupChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*DatabaseBackupChecker) Run added in v0.38.88

func (*DatabaseBackupChecker) Type added in v0.38.88

func (c *DatabaseBackupChecker) Type() string

type DynatraceChecker added in v0.38.275

type DynatraceChecker struct{}

func (*DynatraceChecker) Check added in v0.38.275

func (t *DynatraceChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*DynatraceChecker) Run added in v0.38.275

func (*DynatraceChecker) Type added in v0.38.275

func (t *DynatraceChecker) Type() string

type EC2Checker added in v0.33.0

type EC2Checker struct {
}

func (*EC2Checker) Check added in v0.33.0

func (c *EC2Checker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*EC2Checker) Run added in v0.33.0

func (c *EC2Checker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*EC2Checker) Type added in v0.33.0

func (c *EC2Checker) Type() string

Type: returns checker type

type ElasticsearchChecker added in v0.38.136

type ElasticsearchChecker struct{}

func (*ElasticsearchChecker) Check added in v0.38.136

func (c *ElasticsearchChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*ElasticsearchChecker) Run added in v0.38.136

func (*ElasticsearchChecker) Type added in v0.38.136

func (c *ElasticsearchChecker) Type() string

type ExecChecker added in v0.38.54

type ExecChecker struct {
}

func (*ExecChecker) Check added in v0.38.54

func (c *ExecChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*ExecChecker) Run added in v0.38.54

func (c *ExecChecker) Run(ctx *context.Context) pkg.Results

func (*ExecChecker) Type added in v0.38.54

func (c *ExecChecker) Type() string

type ExecDetails added in v0.38.54

type ExecDetails struct {
	Cmd      *exec.Cmd `json:"-"`
	Stdout   string    `json:"stdout"`
	Stderr   string    `json:"stderr"`
	ExitCode int       `json:"exitCode"`
	Error    error     `json:"-"`
}

func (ExecDetails) String added in v1.0.97

func (e ExecDetails) String() string

type File added in v1.0.88

type File struct {
	Name     string    `json:"name,omitempty"`
	Size     int64     `json:"size,omitempty"`
	Mode     string    `json:"mode,omitempty"`
	Modified time.Time `json:"modified"`
	IsDir    bool      `json:"is_dir,omitempty"`
}

type FolderCheck added in v0.38.4

type FolderCheck struct {
	Oldest        *File  `json:"oldest,omitempty"`
	Newest        *File  `json:"newest,omitempty"`
	MinSize       *File  `json:"smallest,omitempty"`
	MaxSize       *File  `json:"largest,omitempty"`
	TotalSize     int64  `json:"size,omitempty"`
	AvailableSize int64  `json:"availableSize,omitempty"`
	Files         []File `json:"files"`
}

func (*FolderCheck) Append added in v0.38.16

func (f *FolderCheck) Append(osFile os.FileInfo)

func (FolderCheck) Test added in v0.38.4

func (f FolderCheck) Test(test v1.FolderTest) string

type FolderChecker added in v0.38.45

type FolderChecker struct {
}

func (*FolderChecker) Check added in v0.38.45

func (c *FolderChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*FolderChecker) Run added in v0.38.45

func (c *FolderChecker) Run(ctx *context.Context) pkg.Results

func (*FolderChecker) Type added in v0.38.45

func (c *FolderChecker) Type() string

type GCS added in v0.38.26

type GCS struct {
	BucketName string
	*gcs.Client
}

type GitHubChecker added in v0.38.43

type GitHubChecker struct {
}

func (*GitHubChecker) Check added in v0.38.43

func (c *GitHubChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*GitHubChecker) Run added in v0.38.43

func (c *GitHubChecker) Run(ctx *context.Context) pkg.Results

func (*GitHubChecker) Type added in v0.38.43

func (c *GitHubChecker) Type() string

type GitProtocolChecker added in v1.0.182

type GitProtocolChecker struct{}

func (*GitProtocolChecker) Check added in v1.0.182

func (c *GitProtocolChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*GitProtocolChecker) Run added in v1.0.182

func (*GitProtocolChecker) Type added in v1.0.182

func (c *GitProtocolChecker) Type() string

type HTTPChecker added in v0.19.2

type HTTPChecker struct {
}

func (*HTTPChecker) Check added in v0.19.2

func (c *HTTPChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*HTTPChecker) Run added in v0.19.2

func (c *HTTPChecker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*HTTPChecker) Type added in v0.19.2

func (c *HTTPChecker) Type() string

Type: returns checker type

type IcmpChecker

type IcmpChecker struct{}

func (*IcmpChecker) Check

func (c *IcmpChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

CheckConfig : Check every record of DNS name against config information Returns check result and metrics

func (*IcmpChecker) Run

func (c *IcmpChecker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*IcmpChecker) Type

func (c *IcmpChecker) Type() string

Type: returns checker type

type JMeterRecord added in v0.30.0

type JMeterRecord struct {
	Elapsed        int64  `csv:"elapsed"`
	Success        bool   `csv:"success"`
	FailureMessage string `csv:"failureMessage,omitempty"`
}

type JmeterChecker added in v0.19.1

type JmeterChecker struct {
}

func (*JmeterChecker) Check added in v0.19.1

func (c *JmeterChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*JmeterChecker) Run added in v0.19.1

func (c *JmeterChecker) Run(ctx *context.Context) pkg.Results

func (*JmeterChecker) Type added in v0.19.1

func (c *JmeterChecker) Type() string

type JunitChecker added in v0.21.0

type JunitChecker struct {
}

JunitChecker runs a junit test on a new kubernetes pod and then saves the test result.

func (*JunitChecker) Check added in v0.21.0

func (c *JunitChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*JunitChecker) Run added in v0.21.0

func (c *JunitChecker) Run(ctx *context.Context) pkg.Results

func (*JunitChecker) Type added in v0.21.0

func (c *JunitChecker) Type() string

type JunitTest added in v0.38.0

type JunitTest struct {
	// Name is a descriptor given to the test.
	Name string `json:"name" yaml:"name"`

	// Classname is an additional descriptor for the hierarchy of the test.
	Classname string `json:"classname" yaml:"classname"`

	// Duration is the total time taken to run the tests.
	Duration float64 `json:"duration" yaml:"duration"`

	// Status is the result of the test. Status values are passed, skipped,
	// failure, & error.
	Status junit.Status `json:"status" yaml:"status"`

	// Message is an textual description optionally included with a skipped,
	// failure, or error test case.
	Message string `json:"message,omitempty" yaml:"message,omitempty"`

	// Error is a record of the failure or error of a test, if applicable.
	//
	// The following relations should hold true.
	//   Error == nil && (Status == Passed || Status == Skipped)
	//   Error != nil && (Status == Failed || Status == Error)
	Error error `json:"error,omitempty" yaml:"error,omitempty"`

	// Additional properties from XML node attributes.
	// Some tools use them to store additional information about test location.
	Properties map[string]string `json:"properties,omitempty" yaml:"properties,omitempty"`

	// SystemOut is textual output for the test case. Usually output that is
	// written to stdout.
	SystemOut string `json:"stdout,omitempty" yaml:"stdout,omitempty"`

	// SystemErr is textual error output for the test case. Usually output that is
	// written to stderr.
	SystemErr string `json:"stderr,omitempty" yaml:"stderr,omitempty"`
}

Test represents the results of a single test run.

func FromTest added in v0.38.17

func FromTest(test junit.Test) JunitTest

type JunitTestSuite added in v0.38.0

type JunitTestSuite struct {
	Name   string `json:"name"`
	Totals `json:",inline"`
	Tests  []JunitTest `json:"tests"`
}

func GetJunitReportFromResults added in v0.38.52

func GetJunitReportFromResults(canaryName string, results []*pkg.CheckResult) JunitTestSuite

type JunitTestSuites added in v0.38.17

type JunitTestSuites struct {
	Suites []JunitTestSuite `json:"suites,omitempty"`
	Totals `json:",inline"`
}

func (JunitTestSuites) Append added in v0.38.17

func (suites JunitTestSuites) Append(suite junit.Suite) JunitTestSuites

func (JunitTestSuites) GetMessages added in v0.38.17

func (suites JunitTestSuites) GetMessages() string

func (JunitTestSuites) Ingest added in v0.38.17

func (suites JunitTestSuites) Ingest(xml string) (JunitTestSuites, error)

type KubernetesChecker added in v0.38.44

type KubernetesChecker struct{}

func (*KubernetesChecker) Check added in v0.38.44

func (c *KubernetesChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

CheckConfig : Check every ldap entry for lookup and auth Returns check result and metrics

func (*KubernetesChecker) Run added in v0.38.44

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*KubernetesChecker) Type added in v0.38.44

func (c *KubernetesChecker) Type() string

type KubernetesResourceChecker added in v1.0.259

type KubernetesResourceChecker struct{}

func (*KubernetesResourceChecker) Check added in v1.0.259

func (*KubernetesResourceChecker) Run added in v1.0.259

func (*KubernetesResourceChecker) Type added in v1.0.259

type LdapChecker

type LdapChecker struct {
}

func (*LdapChecker) Check

func (c *LdapChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

CheckConfig : Check every ldap entry for lookup and auth Returns check result and metrics

func (*LdapChecker) Run

func (c *LdapChecker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*LdapChecker) Type

func (c *LdapChecker) Type() string

Type: returns checker type

type MongoDBChecker added in v0.38.4

type MongoDBChecker struct {
}

func (*MongoDBChecker) Check added in v0.38.4

func (c *MongoDBChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*MongoDBChecker) Run added in v0.38.4

func (c *MongoDBChecker) Run(ctx *context.Context) pkg.Results

func (*MongoDBChecker) Type added in v0.38.4

func (c *MongoDBChecker) Type() string

type MssqlChecker added in v0.18.0

type MssqlChecker struct{}

func (*MssqlChecker) Check added in v0.18.0

func (c *MssqlChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

Check CheckConfig : Attempts to connect to a DB using the specified

driver and connection string

Returns check result and metrics

func (*MssqlChecker) Run added in v0.18.0

func (c *MssqlChecker) Run(ctx *context.Context) pkg.Results

Run - Check every entry from config according to Checker interface Returns check result and metrics

func (*MssqlChecker) Type added in v0.18.0

func (c *MssqlChecker) Type() string

Type: returns checker type

type MysqlChecker added in v0.38.66

type MysqlChecker struct{}

func (*MysqlChecker) Check added in v0.38.66

func (c *MysqlChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*MysqlChecker) Run added in v0.38.66

func (c *MysqlChecker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*MysqlChecker) Type added in v0.38.66

func (c *MysqlChecker) Type() string

type NameGenerator added in v0.9.0

type NameGenerator struct {
	NamespacesCount int
	PodsCount       int
	// contains filtered or unexported fields
}

func (*NameGenerator) NamespaceName added in v0.9.0

func (n *NameGenerator) NamespaceName(prefix string) string

func (*NameGenerator) PodName added in v0.9.0

func (n *NameGenerator) PodName(prefix string) string

type NamespaceChecker added in v0.9.0

type NamespaceChecker struct {
	// contains filtered or unexported fields
}

func NewNamespaceChecker added in v0.9.0

func NewNamespaceChecker() *NamespaceChecker

func (*NamespaceChecker) Check added in v0.9.0

func (c *NamespaceChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*NamespaceChecker) Cleanup added in v0.9.0

func (c *NamespaceChecker) Cleanup(ns *v1.Namespace) error

func (*NamespaceChecker) Run added in v0.9.0

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*NamespaceChecker) Type added in v0.9.0

func (c *NamespaceChecker) Type() string

Type: returns checker type

func (*NamespaceChecker) WaitForPod added in v0.9.0

func (c *NamespaceChecker) WaitForPod(ns, name string, timeout time.Duration, phases ...v1.PodPhase) (*v1.Pod, error)

WaitForPod waits for a pod to be in the specified phase, or returns an error if the timeout is exceeded

type OpenSearchChecker added in v0.38.302

type OpenSearchChecker struct{}

OpenSearchChecker checks whether the query returns the expected number of results.

func (*OpenSearchChecker) Run added in v0.38.302

func (*OpenSearchChecker) Type added in v0.38.302

func (t *OpenSearchChecker) Type() string

type OpenSearchErrorResponse added in v0.38.302

type OpenSearchErrorResponse struct {
	Error struct {
		Type   string `json:"type"`
		Reason string `json:"reason"`
	} `json:"error"`
}

OpenSearchResponse is a minimal struct representing an error response from open search.

type OpenSearchResponse added in v0.38.302

type OpenSearchResponse struct {
	Hits struct {
		Total struct {
			Value int64 `json:"value"`
		} `json:"total"`
	} `json:"hits"`
}

OpenSearchResponse is a minimal struct representing a success response from open search.

type PodChecker

type PodChecker struct {
	// contains filtered or unexported fields
}

func NewPodChecker

func NewPodChecker() *PodChecker

func (*PodChecker) Check

func (c *PodChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*PodChecker) Cleanup

func (c *PodChecker) Cleanup(ctx *context.Context, podCheck canaryv1.PodCheck)

func (*PodChecker) Run

func (c *PodChecker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*PodChecker) Type

func (c *PodChecker) Type() string

Type: returns checker type

func (*PodChecker) WaitForPod

func (c *PodChecker) WaitForPod(ns, name string, timeout time.Duration, phases ...v1.PodPhase) (*v1.Pod, error)

WaitForPod waits for a pod to be in the specified phase, or returns an error if the timeout is exceeded

type PostgresChecker

type PostgresChecker struct{}

func (*PostgresChecker) Check

func (c *PostgresChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*PostgresChecker) Run

func (c *PostgresChecker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*PostgresChecker) Type

func (c *PostgresChecker) Type() string

Type: returns checker type

type PrometheusChecker added in v0.35.0

type PrometheusChecker struct{}

func (*PrometheusChecker) Check added in v0.35.0

func (c *PrometheusChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*PrometheusChecker) Run added in v0.35.0

func (*PrometheusChecker) Type added in v0.35.0

func (c *PrometheusChecker) Type() string

type RedisChecker added in v0.18.0

type RedisChecker struct {
}

func (*RedisChecker) Check added in v0.18.0

func (c *RedisChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*RedisChecker) Run added in v0.18.0

func (c *RedisChecker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*RedisChecker) Type added in v0.18.0

func (c *RedisChecker) Type() string

Type: returns checker type

type ResticChecker added in v0.19.0

type ResticChecker struct {
}

func (*ResticChecker) Check added in v0.19.0

func (c *ResticChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*ResticChecker) Run added in v0.19.0

func (c *ResticChecker) Run(ctx *context.Context) pkg.Results

func (*ResticChecker) Type added in v0.19.0

func (c *ResticChecker) Type() string

type S3 added in v0.38.4

type S3 struct {
	*s3.Client
	Bucket string
}

type S3Checker

type S3Checker struct{}

func (*S3Checker) Check

func (c *S3Checker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

func (*S3Checker) Run

func (c *S3Checker) Run(ctx *context.Context) pkg.Results

Run: Check every entry from config according to Checker interface Returns check result and metrics

func (*S3Checker) Type

func (c *S3Checker) Type() string

Type: returns checker type

type SQLChecker added in v0.38.102

type SQLChecker interface {
	GetCheck() external.Check
	GetDriver() string
	GetSQLCheck() v1.SQLCheck
	GetType() string
}

type SQLDetails added in v0.38.25

type SQLDetails struct {
	Rows  []map[string]interface{} `json:"rows"`
	Count int                      `json:"count"`
}

type TCPChecker added in v0.11.4

type TCPChecker struct{}

TCPChecker checks if the given port is open on the given host

func NewTCPChecker added in v0.11.4

func NewTCPChecker() *TCPChecker

NewTCPChecker creates and returns a pointer to a TCPChecker

func (*TCPChecker) Check added in v0.11.4

func (t *TCPChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results

Check performs a single tcp check, returning a checkResult

func (*TCPChecker) Run added in v0.11.4

func (t *TCPChecker) Run(ctx *context.Context) pkg.Results

Run executes tcp checks for the given config, returning results

func (*TCPChecker) Type added in v0.11.4

func (t *TCPChecker) Type() string

Type returns the type

type Timer

type Timer struct {
	Start time.Time
}

func NewTimer

func NewTimer() Timer

func (Timer) Duration added in v0.33.1

func (t Timer) Duration() *time.Duration

func (Timer) Elapsed

func (t Timer) Elapsed() float64

func (Timer) Millis

func (t Timer) Millis() int64

func (Timer) String

func (t Timer) String() string

type Totals added in v0.38.17

type Totals struct {
	Passed   int     `json:"passed"`
	Failed   int     `json:"failed"`
	Skipped  int     `json:"skipped,omitempty"`
	Error    int     `json:"error,omitempty"`
	Duration float64 `json:"duration"`
}

func FromTotals added in v0.38.17

func FromTotals(t junit.Totals) Totals

func (Totals) Add added in v0.38.17

func (t Totals) Add(other Totals) Totals

func (Totals) String added in v0.38.17

func (t Totals) String() string

Jump to

Keyboard shortcuts

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