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