Skip to main content

infra.go

infra.go - Overview

This file defines data structures (models) and related functionalities for handling infrastructure-related requests and responses in the query service. It includes definitions for hosts, processes, pods, nodes, namespaces, clusters, deployments, daemonsets, statefulsets, jobs, and volumes, along with their respective request and response structures. It also provides sorting functionalities for some of the response types.

Detailed Documentation

Type ResponseType

type ResponseType string
  • Purpose: Defines a type for representing the response type, either a list or a grouped list.
  • Type: string

Constants

const (
ResponseTypeList ResponseType = "list"
ResponseTypeGroupedList ResponseType = "grouped_list"
)
  • Purpose: Defines constants for the possible values of ResponseType.
    • ResponseTypeList: Represents a simple list response.
    • ResponseTypeGroupedList: Represents a grouped list response.

Type HostListRequest

type HostListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of hosts.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type HostListRecord

type HostListRecord struct {
HostName string `json:"hostName"`
Active bool `json:"active"`
OS string `json:"os"`
CPU float64 `json:"cpu"`
Memory float64 `json:"memory"`
Wait float64 `json:"wait"`
Load15 float64 `json:"load15"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the host list.
  • Parameters:
    • HostName: string - The name of the host.
    • Active: bool - Indicates if the host is active.
    • OS: string - The operating system of the host.
    • CPU: float64 - The CPU usage of the host.
    • Memory: float64 - The memory usage of the host.
    • Wait: float64 - The wait time of the host.
    • Load15: float64 - The 15-minute load average of the host.
    • Meta: map[string]string - Metadata associated with the host.

Type HostListResponse

type HostListResponse struct {
Type ResponseType `json:"type"`
Records []HostListRecord `json:"records"`
Total int `json:"total"`
SentAnyHostMetricsData bool `json:"sentAnyHostMetricsData"`
IsSendingK8SAgentMetrics bool `json:"isSendingK8SAgentMetrics"`
ClusterNames []string `json:"clusterNames"`
NodeNames []string `json:"nodeNames"`
}
  • Purpose: Represents the response containing a list of hosts.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []HostListRecord - A list of host records.
    • Total: int - The total number of host records.
    • SentAnyHostMetricsData: bool - Indicates if any host metrics data was sent.
    • IsSendingK8SAgentMetrics: bool - Indicates if K8S agent metrics are being sent.
    • ClusterNames: []string - List of cluster names.
    • NodeNames: []string - List of node names.

Function (*HostListResponse) SortBy

func (r *HostListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the HostListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type ProcessListRequest

type ProcessListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of processes.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type ProcessListResponse

type ProcessListResponse struct {
Type ResponseType `json:"type"`
Records []ProcessListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of processes.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []ProcessListRecord - A list of process records.
    • Total: int - The total number of process records.

Type ProcessListRecord

type ProcessListRecord struct {
ProcessName string `json:"processName"`
ProcessID string `json:"processID"`
ProcessCMD string `json:"processCMD"`
ProcessCMDLine string `json:"processCMDLine"`
ProcessCPU float64 `json:"processCPU"`
ProcessMemory float64 `json:"processMemory"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the process list.
  • Parameters:
    • ProcessName: string - The name of the process.
    • ProcessID: string - The ID of the process.
    • ProcessCMD: string - The command used to start the process.
    • ProcessCMDLine: string - The command line used to start the process.
    • ProcessCPU: float64 - The CPU usage of the process.
    • ProcessMemory: float64 - The memory usage of the process.
    • Meta: map[string]string - Metadata associated with the process.

Type PodListRequest

type PodListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of pods.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type PodListResponse

type PodListResponse struct {
Type ResponseType `json:"type"`
Records []PodListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of pods.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []PodListRecord - A list of pod records.
    • Total: int - The total number of pod records.

Function (*PodListResponse) SortBy

func (r *PodListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the PodListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type PodListRecord

type PodListRecord struct {
PodUID string `json:"podUID,omitempty"`
PodCPU float64 `json:"podCPU"`
PodCPURequest float64 `json:"podCPURequest"`
PodCPULimit float64 `json:"podCPULimit"`
PodMemory float64 `json:"podMemory"`
PodMemoryRequest float64 `json:"podMemoryRequest"`
PodMemoryLimit float64 `json:"podMemoryLimit"`
RestartCount int `json:"restartCount"`
Meta map[string]string `json:"meta"`
CountByPhase PodCountByPhase `json:"countByPhase"`
}
  • Purpose: Represents a single record in the pod list.
  • Parameters:
    • PodUID: string - The unique ID of the pod.
    • PodCPU: float64 - The CPU usage of the pod.
    • PodCPURequest: float64 - The requested CPU for the pod.
    • PodCPULimit: float64 - The CPU limit for the pod.
    • PodMemory: float64 - The memory usage of the pod.
    • PodMemoryRequest: float64 - The requested memory for the pod.
    • PodMemoryLimit: float64 - The memory limit for the pod.
    • RestartCount: int - The number of times the pod has restarted.
    • Meta: map[string]string - Metadata associated with the pod.
    • CountByPhase: PodCountByPhase - Counts of pods in different phases.

Type PodCountByPhase

type PodCountByPhase struct {
Pending int `json:"pending"`
Running int `json:"running"`
Succeeded int `json:"succeeded"`
Failed int `json:"failed"`
Unknown int `json:"unknown"`
}
  • Purpose: Represents the count of pods in each phase.
  • Parameters:
    • Pending: int - Number of pods in the Pending phase.
    • Running: int - Number of pods in the Running phase.
    • Succeeded: int - Number of pods in the Succeeded phase.
    • Failed: int - Number of pods in the Failed phase.
    • Unknown: int - Number of pods in the Unknown phase.

Type NodeListRequest

type NodeListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of nodes.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type NodeListResponse

type NodeListResponse struct {
Type ResponseType `json:"type"`
Records []NodeListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of nodes.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []NodeListRecord - A list of node records.
    • Total: int - The total number of node records.

Function (*NodeListResponse) SortBy

func (r *NodeListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the NodeListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type NodeCountByCondition

type NodeCountByCondition struct {
Ready int `json:"ready"`
NotReady int `json:"notReady"`
Unknown int `json:"unknown"`
}
  • Purpose: Represents the count of nodes by condition.
  • Parameters:
    • Ready: int - Number of nodes in the Ready condition.
    • NotReady: int - Number of nodes in the NotReady condition.
    • Unknown: int - Number of nodes in the Unknown condition.

Type NodeListRecord

type NodeListRecord struct {
NodeUID string `json:"nodeUID,omitempty"`
NodeCPUUsage float64 `json:"nodeCPUUsage"`
NodeCPUAllocatable float64 `json:"nodeCPUAllocatable"`
NodeMemoryUsage float64 `json:"nodeMemoryUsage"`
NodeMemoryAllocatable float64 `json:"nodeMemoryAllocatable"`
CountByCondition NodeCountByCondition `json:"countByCondition"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the node list.
  • Parameters:
    • NodeUID: string - The unique ID of the node.
    • NodeCPUUsage: float64 - The CPU usage of the node.
    • NodeCPUAllocatable: float64 - The allocatable CPU of the node.
    • NodeMemoryUsage: float64 - The memory usage of the node.
    • NodeMemoryAllocatable: float64 - The allocatable memory of the node.
    • CountByCondition: NodeCountByCondition - Counts of nodes by condition.
    • Meta: map[string]string - Metadata associated with the node.

Type NamespaceListRequest

type NamespaceListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of namespaces.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type NamespaceListResponse

type NamespaceListResponse struct {
Type ResponseType `json:"type"`
Records []NamespaceListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of namespaces.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []NamespaceListRecord - A list of namespace records.
    • Total: int - The total number of namespace records.

Function (*NamespaceListResponse) SortBy

func (r *NamespaceListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the NamespaceListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type NamespaceListRecord

type NamespaceListRecord struct {
NamespaceName string `json:"namespaceName"`
CPUUsage float64 `json:"cpuUsage"`
MemoryUsage float64 `json:"memoryUsage"`
CountByPhase PodCountByPhase `json:"countByPhase"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the namespace list.
  • Parameters:
    • NamespaceName: string - The name of the namespace.
    • CPUUsage: float64 - The CPU usage of the namespace.
    • MemoryUsage: float64 - The memory usage of the namespace.
    • CountByPhase: PodCountByPhase - Counts of pods in different phases within the namespace.
    • Meta: map[string]string - Metadata associated with the namespace.

Type ClusterListRequest

type ClusterListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of clusters.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type ClusterListResponse

type ClusterListResponse struct {
Type ResponseType `json:"type"`
Records []ClusterListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of clusters.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []ClusterListRecord - A list of cluster records.
    • Total: int - The total number of cluster records.

Function (*ClusterListResponse) SortBy

func (r *ClusterListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the ClusterListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type ClusterListRecord

type ClusterListRecord struct {
ClusterUID string `json:"clusterUID"`
CPUUsage float64 `json:"cpuUsage"`
CPUAllocatable float64 `json:"cpuAllocatable"`
MemoryUsage float64 `json:"memoryUsage"`
MemoryAllocatable float64 `json:"memoryAllocatable"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the cluster list.
  • Parameters:
    • ClusterUID: string - The unique ID of the cluster.
    • CPUUsage: float64 - The CPU usage of the cluster.
    • CPUAllocatable: float64 - The allocatable CPU of the cluster.
    • MemoryUsage: float64 - The memory usage of the cluster.
    • MemoryAllocatable: float64 - The allocatable memory of the cluster.
    • Meta: map[string]string - Metadata associated with the cluster.

Type DeploymentListRequest

type DeploymentListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of deployments.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type DeploymentListResponse

type DeploymentListResponse struct {
Type ResponseType `json:"type"`
Records []DeploymentListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of deployments.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []DeploymentListRecord - A list of deployment records.
    • Total: int - The total number of deployment records.

Function (*DeploymentListResponse) SortBy

func (r *DeploymentListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the DeploymentListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type DeploymentListRecord

type DeploymentListRecord struct {
DeploymentName string `json:"deploymentName"`
CPUUsage float64 `json:"cpuUsage"`
MemoryUsage float64 `json:"memoryUsage"`
DesiredPods int `json:"desiredPods"`
AvailablePods int `json:"availablePods"`
CPURequest float64 `json:"cpuRequest"`
MemoryRequest float64 `json:"memoryRequest"`
CPULimit float64 `json:"cpuLimit"`
MemoryLimit float64 `json:"memoryLimit"`
Restarts int `json:"restarts"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the deployment list.
  • Parameters:
    • DeploymentName: string - The name of the deployment.
    • CPUUsage: float64 - The CPU usage of the deployment.
    • MemoryUsage: float64 - The memory usage of the deployment.
    • DesiredPods: int - The desired number of pods for the deployment.
    • AvailablePods: int - The available number of pods for the deployment.
    • CPURequest: float64 - The requested CPU for the deployment.
    • MemoryRequest: float64 - The requested memory for the deployment.
    • CPULimit: float64 - The CPU limit for the deployment.
    • MemoryLimit: float64 - The memory limit for the deployment.
    • Restarts: int - The number of times the deployment has restarted.
    • Meta: map[string]string - Metadata associated with the deployment.

Type DaemonSetListRequest

type DaemonSetListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of daemon sets.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type DaemonSetListResponse

type DaemonSetListResponse struct {
Type ResponseType `json:"type"`
Records []DaemonSetListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of daemon sets.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []DaemonSetListRecord - A list of daemon set records.
    • Total: int - The total number of daemon set records.

Function (*DaemonSetListResponse) SortBy

func (r *DaemonSetListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the DaemonSetListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type DaemonSetListRecord

type DaemonSetListRecord struct {
DaemonSetName string `json:"daemonSetName"`
CPUUsage float64 `json:"cpuUsage"`
MemoryUsage float64 `json:"memoryUsage"`
CPURequest float64 `json:"cpuRequest"`
MemoryRequest float64 `json:"memoryRequest"`
CPULimit float64 `json:"cpuLimit"`
MemoryLimit float64 `json:"memoryLimit"`
Restarts int `json:"restarts"`
DesiredNodes int `json:"desiredNodes"`
AvailableNodes int `json:"availableNodes"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the daemon set list.
  • Parameters:
    • DaemonSetName: string - The name of the daemon set.
    • CPUUsage: float64 - The CPU usage of the daemon set.
    • MemoryUsage: float64 - The memory usage of the daemon set.
    • CPURequest: float64 - The requested CPU for the daemon set.
    • MemoryRequest: float64 - The requested memory for the daemon set.
    • CPULimit: float64 - The CPU limit for the daemon set.
    • MemoryLimit: float64 - The memory limit for the daemon set.
    • Restarts: int - The number of times the daemon set has restarted.
    • DesiredNodes: int - The desired number of nodes for the daemon set.
    • AvailableNodes: int - The available number of nodes for the daemon set.
    • Meta: map[string]string - Metadata associated with the daemon set.

Type StatefulSetListRequest

type StatefulSetListRequest struct {
Start int64 `json:"start"` // epoch time in ms
End int64 `json:"end"` // epoch time in ms
Filters *v3.FilterSet `json:"filters"`
GroupBy []v3.AttributeKey `json:"groupBy"`
OrderBy *v3.OrderBy `json:"orderBy"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
  • Purpose: Represents a request for a list of stateful sets.
  • Parameters:
    • Start: int64 - The start time in epoch milliseconds.
    • End: int64 - The end time in epoch milliseconds.
    • Filters: *v3.FilterSet - A set of filters to apply to the query.
    • GroupBy: []v3.AttributeKey - A list of attributes to group by.
    • OrderBy: *v3.OrderBy - The order in which to sort the results.
    • Offset: int - The offset for pagination.
    • Limit: int - The maximum number of results to return.

Type StatefulSetListResponse

type StatefulSetListResponse struct {
Type ResponseType `json:"type"`
Records []StatefulSetListRecord `json:"records"`
Total int `json:"total"`
}
  • Purpose: Represents the response containing a list of stateful sets.
  • Parameters:
    • Type: ResponseType - The type of the response (list or grouped_list).
    • Records: []StatefulSetListRecord - A list of stateful set records.
    • Total: int - The total number of stateful set records.

Function (*StatefulSetListResponse) SortBy

func (r *StatefulSetListResponse) SortBy(orderBy *v3.OrderBy)
  • Purpose: Sorts the Records in the StatefulSetListResponse based on the provided orderBy parameter.
  • Parameters:
    • orderBy: *v3.OrderBy - Specifies the column to sort by and the sorting direction.
  • Returns: None

Type StatefulSetListRecord

type StatefulSetListRecord struct {
StatefulSetName string `json:"statefulSetName"`
CPUUsage float64 `json:"cpuUsage"`
MemoryUsage float64 `json:"memoryUsage"`
CPURequest float64 `json:"cpuRequest"`
MemoryRequest float64 `json:"memoryRequest"`
CPULimit float64 `json:"cpuLimit"`
MemoryLimit float64 `json:"memoryLimit"`
Restarts int `json:"restarts"`
DesiredPods int `json:"desiredPods"`
AvailablePods int `json:"availablePods"`
Meta map[string]string `json:"meta"`
}
  • Purpose: Represents a single record in the stateful set list.
  • Parameters:
    • StatefulSetName: string - The name of the stateful set.
    • CPUUsage: float64 - The CPU usage of the stateful set.
    • MemoryUsage: float64 - The memory usage of the stateful set.
    • CPURequest: float64 - The requested CPU for the stateful set.
    • MemoryRequest: float64 - The requested memory for the stateful set.
    • CPULimit: float64 - The CPU limit for the stateful set.
    • MemoryLimit: float64 - The memory limit for the stateful set.
    • Restarts: int - The number of times the stateful set has restarted.
    • DesiredPods: `int