Documentation ¶
Index ¶
- func GetClusterName(config *rest.Config) string
- func GetKubeconfig() string
- func NewK8sClient() (*kubernetes.Clientset, error)
- func NewKommonsClient() (*kommons.Client, error)
- func ParseConfig(configfile string, datafile string) ([]v1.Canary, error)
- type Check
- type CheckResult
- func (result *CheckResult) AddData(data map[string]interface{}) *CheckResult
- func (result *CheckResult) AddDetails(detail interface{}) *CheckResult
- func (result *CheckResult) AddMetric(metric Metric) *CheckResult
- func (result *CheckResult) ErrorMessage(err error) *CheckResult
- func (result *CheckResult) Failf(message string, args ...interface{}) *CheckResult
- func (result CheckResult) GetDescription() string
- func (result *CheckResult) GetDuration() int64
- func (result *CheckResult) ResultDescription(description string) *CheckResult
- func (result *CheckResult) ResultMessage(message string, args ...interface{}) *CheckResult
- func (result *CheckResult) StartTime(start time.Time) *CheckResult
- func (result CheckResult) String() string
- func (result *CheckResult) TextResults(textResults bool) *CheckResult
- type CheckStatus
- type Checker
- type Checks
- type Config
- type Endpoint
- type JSONTime
- type Latency
- type Metric
- type MetricType
- type URL
- type Uptime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterName ¶ added in v0.11.3
func GetKubeconfig ¶
func GetKubeconfig() string
func NewK8sClient ¶
func NewK8sClient() (*kubernetes.Clientset, error)
func NewKommonsClient ¶ added in v0.17.0
Types ¶
type Check ¶
type Check struct { Key string `json:"key"` Type string `json:"type"` Name string `json:"name"` Namespace string `json:"namespace"` Labels map[string]string `json:"labels"` RunnerLabels map[string]string `json:"runnerLabels"` CanaryName string `json:"canaryName"` Description string `json:"description"` Endpoint string `json:"endpoint"` Uptime Uptime `json:"uptime"` Latency Latency `json:"latency"` Statuses []CheckStatus `json:"checkStatuses" mapstructure:"-"` Interval uint64 `json:"interval"` Schedule string `json:"schedule"` Owner string `json:"owner"` Severity string `json:"severity"` Icon string `json:"icon"` DisplayType string `json:"displayType"` RunnerName string `json:"runnerName"` // Specify the canary id, <runner>/<namespace>/<name> ID string `json:"id"` Canary *v1.Canary `json:"-"` }
func (Check) GetDescription ¶
func (Check) GetNamespace ¶ added in v0.16.0
type CheckResult ¶
type CheckResult struct { Start time.Time Pass bool Invalid bool Detail interface{} Data map[string]interface{} Duration int64 Description string DisplayType string Message string Error string Metrics []Metric // Check is the configuration Check external.Check Canary v1.Canary }
func SetupError ¶ added in v0.38.25
func SetupError(canary v1.Canary, err error) []*CheckResult
func (*CheckResult) AddData ¶ added in v0.38.4
func (result *CheckResult) AddData(data map[string]interface{}) *CheckResult
func (*CheckResult) AddDetails ¶ added in v0.38.0
func (result *CheckResult) AddDetails(detail interface{}) *CheckResult
func (*CheckResult) AddMetric ¶ added in v0.38.4
func (result *CheckResult) AddMetric(metric Metric) *CheckResult
func (*CheckResult) ErrorMessage ¶ added in v0.32.1
func (result *CheckResult) ErrorMessage(err error) *CheckResult
func (*CheckResult) Failf ¶ added in v0.38.4
func (result *CheckResult) Failf(message string, args ...interface{}) *CheckResult
func (CheckResult) GetDescription ¶ added in v0.11.4
func (result CheckResult) GetDescription() string
func (*CheckResult) GetDuration ¶ added in v0.38.19
func (result *CheckResult) GetDuration() int64
func (*CheckResult) ResultDescription ¶ added in v0.32.1
func (result *CheckResult) ResultDescription(description string) *CheckResult
func (*CheckResult) ResultMessage ¶ added in v0.32.1
func (result *CheckResult) ResultMessage(message string, args ...interface{}) *CheckResult
func (*CheckResult) StartTime ¶ added in v0.32.1
func (result *CheckResult) StartTime(start time.Time) *CheckResult
func (CheckResult) String ¶
func (result CheckResult) String() string
func (*CheckResult) TextResults ¶ added in v0.32.1
func (result *CheckResult) TextResults(textResults bool) *CheckResult
type CheckStatus ¶ added in v0.11.0
type CheckStatus struct { Status bool `json:"status"` Invalid bool `json:"invalid"` Time string `json:"time"` Duration int `json:"duration"` Message string `json:"message"` Error string `json:"error,omitempty"` Detail interface{} `json:"-"` }
func FromResult ¶ added in v0.36.0
func FromResult(result CheckResult) CheckStatus
type Checker ¶
type Checker interface {
CheckArgs(args map[string]interface{}) *CheckResult
}
type Config ¶
type Config struct { HTTP []v1.HTTPCheck `yaml:"http,omitempty" json:"http,omitempty"` DNS []v1.DNSCheck `yaml:"dns,omitempty" json:"dns,omitempty"` ContainerdPull []v1.ContainerdPullCheck `yaml:"containerdPull,omitempty" json:"containerdPull,omitempty"` ContainerdPush []v1.ContainerdPushCheck `yaml:"containerdPush,omitempty" json:"containerdPush,omitempty"` DockerPull []v1.DockerPullCheck `yaml:"docker,omitempty" json:"docker,omitempty"` DockerPush []v1.DockerPushCheck `yaml:"dockerPush,omitempty" json:"dockerPush,omitempty"` S3 []v1.S3Check `yaml:"s3,omitempty" json:"s3,omitempty"` TCP []v1.TCPCheck `yaml:"tcp,omitempty" json:"tcp,omitempty"` Pod []v1.PodCheck `yaml:"pod,omitempty" json:"pod,omitempty"` LDAP []v1.LDAPCheck `yaml:"ldap,omitempty" json:"ldap,omitempty"` ICMP []v1.ICMPCheck `yaml:"icmp,omitempty" json:"icmp,omitempty"` Postgres []v1.PostgresCheck `yaml:"postgres,omitempty" json:"postgres,omitempty"` Mssql []v1.MssqlCheck `yaml:"mssql,omitempty" json:"mssql,omitempty"` Redis []v1.RedisCheck `yaml:"redis,omitempty" json:"redis,omitempty"` Helm []v1.HelmCheck `yaml:"helm,omitempty" json:"helm,omitempty"` Namespace []v1.NamespaceCheck `yaml:"namespace,omitempty" json:"namespace,omitempty"` Interval metav1.Duration `yaml:"-" json:"interval,omitempty"` }
type JSONTime ¶ added in v0.11.0
func (JSONTime) MarshalJSON ¶ added in v0.11.0
func (*JSONTime) UnmarshalJSON ¶ added in v0.11.0
type Latency ¶ added in v0.37.0
type Metric ¶
type Metric struct { Name string Type MetricType Labels map[string]string Value float64 }
type MetricType ¶
type MetricType string
Click to show internal directories.
Click to hide internal directories.