api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Level   string    `json:"level,omitempty"`
	Since   time.Time `json:"since,omitempty"`
	Message string    `json:"message,omitempty"`
}

type Canarydata

type Canarydata struct {
	ServerName string  `json:"server_name,omitempty"`
	Checks     []Check `json:"checks,omitempty"`
}

type Check added in v0.1.2

type Check struct {
	Key           string        `json:"key,omitempty"`
	Type          string        `json:"type,omitempty"`
	Name          string        `json:"name,omitempty"`
	Description   string        `json:"description,omitempty"`
	Uptime        string        `json:"uptime,omitempty"`
	Latency       string        `json:"latency,omitempty"`
	CheckStatuses []CheckStatus `json:"checkStatuses,omitempty"`
}

type CheckStatus added in v0.1.2

type CheckStatus struct {
	Status   bool
	Invalid  bool
	Time     string
	Duration int
	Message  string
}

type Cluster

type Cluster struct {
	Name         string     `json:"name,omitempty"`
	Kubernetes   Kubernetes `json:"kubernetes,omitempty"`
	Properties   []Property `json:"properties,omitempty"`
	CanaryChecks []Check    `json:"canaryChecks,omitempty"`
	Alerts       []Alert    `json:"alerts,omitempty"`
}

type ClusterConfiguration

type ClusterConfiguration struct {
	CanaryChecker string `yaml:"canaryChecker,omitempty"`
	Prometheus    string `yaml:"prometheus,omitempty"`
	AlertManager  string `yaml:"alertmanager,omitempty"`
	Kubeconfig    string `yaml:"kubeconfig,omitempty"`
}

type Config added in v0.1.2

type Config struct {
	Clusters map[string]ClusterConfiguration `yaml:"clusters,omitempty"`
}

type Kubernetes added in v0.1.2

type Kubernetes struct {
	CPU            int    `json:"cpu"`
	Memory         int64  `json:"memory"`
	Disk           int64  `json:"disk"`
	KubeletVersion string `json:"kubeletVersion"`
	KernelVersion  string `json:"kernelVersion"`
	OSVersion      string `json:"osVersion"`
	CRIVersion     string `json:"criVersion"`
	Nodes          []Node `json:"nodes"`

	KubeletAlerts []Alert `json:"kubeletAlerts"`
	KernelAlerts  []Alert `json:"kernelAlerts"`
	OSAlerts      []Alert `json:"osAlerts"`
	CRIAlerts     []Alert `json:"criAlerts"`
}

type Node

type Node struct {
	Name             string  `json:"name"`
	InternalIP       string  `json:"internalIP"`
	ExternalIP       string  `json:"externalIP"`
	KernelVersion    string  `json:"kernelVersion"`
	KubeletVersion   string  `json:"kubeletVersion"`
	ContainerRuntime string  `json:"containerRuntime"`
	OSImage          string  `json:"osImage"`
	Alerts           []Alert `json:"alerts"`
}

type Property

type Property struct {
	Name   string  `json:"name,omitempty"`
	Value  string  `json:"label,omitempty"`
	Type   string  `json:"type,omitempty"`
	Icon   string  `json:"icon,omitempty"`
	Alerts []Alert `json:"alerts,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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