models

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NewDaemon  = "NEW_DAEMON"
	AllDaemons = "ALL_DAEMONS"
	DaemonLeft = "DAEMON_LEFT"

	CurrentChecks = "CURRENT_CHECKS"
	StartChecks   = "START_CHECKS"
	StopChecks    = "STOP_CHECKS"
	CheckResults  = "CHECK_RESULTS"
	ResetStats    = "RESET_STATS"
)

Websocket types

View Source
const (
	MasterApiCheck        = "MASTER_API_CHECK"
	DnsNslookupKubernetes = "DNS_NSLOOKUP_KUBERNETES"
	DnsServiceNode        = "DNS_SERVICE_NODE"
	DnsServicePod         = "DNS_SERVICE_POD"
	HttpPodServiceAB      = "HTTP_POD_SERVICE_A_B"
	HttpPodServiceAC      = "HTTP_POD_SERVICE_A_C"
	HttpHaProxy           = "HTTP_HAPROXY"
	HttpServiceABC        = "HTTP_SERVICE_ABC"
	EtcdHealth            = "ETCD_HEALTH"
)

Check types

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	Type    string      `json:"type"`
	Message interface{} `json:"message"`
}

type CheckResult

type CheckResult struct {
	Hostname string
	Type     string
	IsOk     bool
	Message  string
}

type Checks

type Checks struct {
	IsRunning       bool   `json:"isRunning"`
	CheckInterval   int    `json:"checkInterval"`
	MasterApiCheck  bool   `json:"masterApiCheck"`
	MasterApiUrls   string `json:"masterApiUrls"`
	DnsCheck        bool   `json:"dnsCheck"`
	HttpChecks      bool   `json:"httpChecks"`
	DaemonPublicUrl string `json:"daemonPublicUrl"`
	EtcdCheck       bool   `json:"etcdCheck"`
	EtcdIps         string `json:"etcdIps"`
	EtcdCertPath    string `json:"etcdCertPath"`
}

type Daemon

type Daemon struct {
	Hostname         string `json:"hostname"`
	Namespace        string `json:"namespace"`
	DaemonType       string `json:"daemonType"`
	StartedChecks    int    `json:"startedChecks"`
	SuccessfulChecks int    `json:"successfulChecks"`
	FailedChecks     int    `json:"failedChecks"`
}

func (*Daemon) IsMaster

func (d *Daemon) IsMaster() bool

func (*Daemon) IsNode

func (d *Daemon) IsNode() bool

func (*Daemon) IsPod

func (d *Daemon) IsPod() bool

type DaemonClient

type DaemonClient struct {
	Daemon Daemon
	Client *rpc2.Client
	Quit   chan bool
	ToHub  chan CheckResult
}

type Failures added in v1.1.6

type Failures struct {
	Date     time.Time `json:"date"`
	Hostname string    `json:"hostname"`
	Type     string    `json:"type"`
	Message  string    `json:"message"`
}

type Results added in v1.1.6

type Results struct {
	SuccessfulChecks int `json:"successfulChecks"`
	FailedChecks     int `json:"failedChecks"`
	StartedChecks    int `json:"startedChecks"`
	FinishedChecks   int `json:"finishedChecks"`

	SuccessfulChecksByType map[string]int `json:"successfulChecksByType"`
	FailedChecksByType     map[string]int `json:"failedChecksByType"`

	Ticks  []Tick     `json:"ticks"`
	Errors []Failures `json:"failures"`
}

type Tick added in v1.1.6

type Tick struct {
	SuccessfulChecks int `json:"successfulChecks"`
	FailedChecks     int `json:"failedChecks"`
}

Jump to

Keyboard shortcuts

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