Documentation
¶
Index ¶
- func NewScanStatus(scans []v1alpha1.ClusterScan) (map[string]*PluginStatus, *int)
- func NewScanStatusWithIssues(scans []v1alpha1.ClusterScan, issues []v1alpha1.ClusterIssue) map[string]*PluginStatus
- type Cluster
- type ClusterReference
- type ConnectionStatus
- type Issue
- type NsName
- type PluginStatus
- type Resource
- type ResourcedIssue
- type Resources
- type ScanStatus
- type ScanStatusType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewScanStatus ¶
func NewScanStatus(scans []v1alpha1.ClusterScan) (map[string]*PluginStatus, *int)
func NewScanStatusWithIssues ¶
func NewScanStatusWithIssues(scans []v1alpha1.ClusterScan, issues []v1alpha1.ClusterIssue) map[string]*PluginStatus
Types ¶
type Cluster ¶
type Cluster struct {
ApiVersion string `json:"apiVersion"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Environment string `json:"environment"`
Provider string `json:"provider"`
Region string `json:"region"`
TotalNodes *int `json:"totalNodes"`
Version string `json:"version"`
Connection *ConnectionStatus `json:"connection"`
Resources *Resources `json:"resources"`
CreationTimestamp metav1.Time `json:"creationTimestamp"`
TotalIssues *int `json:"totalIssues"`
PluginStatus map[string]*PluginStatus `json:"pluginStatus"`
}
func NewCluster ¶
func NewCluster(cluster v1alpha1.Cluster) Cluster
NewCluster returns a Cluster without pluginStatus and issues
func NewClusterWithIssues ¶
func NewClusterWithIssues(cluster v1alpha1.Cluster, scans []v1alpha1.ClusterScan, issues []v1alpha1.ClusterIssue) Cluster
NewClusterWithIssues returns a Cluster with pluginStatus and their issues
func NewClusterWithScans ¶
func NewClusterWithScans(cluster v1alpha1.Cluster, scans []v1alpha1.ClusterScan) Cluster
NewClusterWithScans returns a Cluster with pluginStatus and without issues
type ClusterReference ¶
type ClusterReference struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
TotalResources int `json:"totalResources"`
}
type ConnectionStatus ¶
type ConnectionStatus struct {
Connected bool `json:"connected"`
Message string `json:"message"`
}
type Issue ¶
type Issue struct {
ApiVersion string `json:"apiVersion"`
ID string `json:"id"`
Message string `json:"message"`
Severity string `json:"severity"`
Category string `json:"category"`
Plugin string `json:"plugin"`
Clusters []ClusterReference `json:"clusters"`
Url string `json:"url"`
}
type PluginStatus ¶
type PluginStatus struct {
Scan *ScanStatus `json:"scan"`
IssueCount *int `json:"issueCount"`
Issues []ResourcedIssue `json:"issues"`
LastSuccessfulScanTime *metav1.Time `json:"lastSuccessfulScanTime"`
LastFinishedScanTime *metav1.Time `json:"lastFinishedScanTime"`
NextScheduleScanTime *metav1.Time `json:"nextScheduleScanTime"`
}
type Resource ¶
type Resource struct {
Available string `json:"available"`
Usage string `json:"usage"`
UsagePercentage int32 `json:"usagePercentage"`
}
type ResourcedIssue ¶
type ResourcedIssue struct {
Issue `json:",inline"`
Resources map[string][]NsName `json:"resources"`
}
func NewResourcedIssue ¶
func NewResourcedIssue(i v1alpha1.ClusterIssue) ResourcedIssue
type Resources ¶
type Resources struct {
Discovered bool `json:"discovered"`
Message string `json:"message"`
Memory *Resource `json:"memory"`
CPU *Resource `json:"cpu"`
}
type ScanStatus ¶
type ScanStatus struct {
Status ScanStatusType `json:"status"`
Message string `json:"message"`
Suspend bool `json:"suspend"`
Schedule string `json:"schedule"`
}
type ScanStatusType ¶
type ScanStatusType string
const (
Failed ScanStatusType = "failed"
Unknown ScanStatusType = "unknown"
Scanned ScanStatusType = "scanned"
)
Click to show internal directories.
Click to hide internal directories.