blob: c185887d795e642dae7894e3167cb60c8fd5ec40 [file] [log] [blame]
Pawel Wieczorek76dd9bf2019-09-26 16:43:01 +02001package check
2
3// Informer collects and returns information on cluster.
4type Informer interface {
5 // GetAPIParams returns API server parameters.
6 GetAPIParams() ([]string, error)
7}
8
9// Command represents commands run on cluster.
10type Command int
11
12const (
13 // APIProcess represents API server command ("kube-apiserver").
14 APIProcess Command = iota
15)
16
17func (c Command) String() string {
18 names := [...]string{
19 "kube-apiserver",
20 }
21
22 if c < APIProcess || c > APIProcess {
23 return "exit"
24 }
25 return names[c]
26}
27
28// Service represents services run on Rancher-based cluster.
29type Service int
30
31const (
32 // APIService represents API server service ("kubernetes/kubernetes").
33 APIService Service = iota
34)
35
36func (s Service) String() string {
37 names := [...]string{
38 "kubernetes/kubernetes",
39 }
40
41 if s < APIService || s > APIService {
42 return ""
43 }
44 return names[s]
45}