Documentation ¶
Index ¶
- Constants
- func CollectData(cmd *cobra.Command, target string) error
- func LoadConfig(target string) (map[string]*SpecInfo, error)
- func SanitizeString(output string, replaceable map[string]string) string
- func StringToArray(output string, delimiter string) []interface{}
- type Cluster
- type Collector
- type Info
- type Node
- type Platform
- type Shell
- type SpecInfo
- type SpecVersion
Constants ¶
View Source
const ( // Version resource version Version = "v1" // Kind resource kind Kind = "NodeInfo" )
View Source
const ( // WorkerNode worker node type WorkerNode = "worker" // MasterNode master Node type MasterNode = "master" )
Variables ¶
This section is empty.
Functions ¶
func CollectData ¶
CollectData run spec audit command and output it result data
func LoadConfig ¶
LoadConfig load audit commands specification from config file
func SanitizeString ¶
SanitizeString snitize string from special characters
func StringToArray ¶
StringToArray convert string with delimiter to array
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func GetCluster ¶
func NewCluster ¶
func NewCluster(clientSet *kubernetes.Clientset, clientConfig clientcmd.ClientConfig, restMApper meta.RESTMapper, dynamicClient dynamic.Interface) *Cluster
type Collector ¶
type Collector struct { Key string `yaml:"key"` Title string `yaml:"title"` Audit string `yaml:"audit"` NodeType string `yaml:"nodeType"` }
Collector details of info to collect
type Node ¶
type Node struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata map[string]string `json:"metadata"` Type string `json:"type"` Info map[string]*Info `json:"info"` }
Node output node data with info results
type SpecInfo ¶
type SpecInfo struct { Version string `yaml:"version"` Name string `yaml:"name"` Title string `yaml:"title"` Collectors []Collector `yaml:"collectors"` }
SpecInfo spec info with require comand to collect
type SpecVersion ¶
Click to show internal directories.
Click to hide internal directories.