Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerPrediction ¶
type ContainerPrediction struct { Namespace metadata.NamespaceName PodName metadata.PodName ContainerName metadata.ContainerName PredictionsRaw map[metric.ContainerMetricType][]metric.Sample PredictionsUpper map[metric.ContainerMetricType][]metric.Sample PredictionsLower map[metric.ContainerMetricType][]metric.Sample }
ContainerPrediction Prediction model to represent one container Prediction
func (*ContainerPrediction) BuildPodPrediction ¶
func (c *ContainerPrediction) BuildPodPrediction() *PodPrediction
BuildPodPrediction Build PodPrediction consist of the receiver in ContainersPredictionMap.
func (ContainerPrediction) NamespacePodContainerName ¶
func (c ContainerPrediction) NamespacePodContainerName() metadata.NamespacePodContainerName
NamespacePodContainerName Return identity of the container Prediction.
type ContainersPredictionMap ¶
type ContainersPredictionMap map[metadata.NamespacePodContainerName]*ContainerPrediction
ContainersPredictionMap Containers Prediction map
func (ContainersPredictionMap) BuildPodsPredictionMap ¶
func (c ContainersPredictionMap) BuildPodsPredictionMap() *PodsPredictionMap
BuildPodsPredictionMap Build PodsPredictionMap base on current ContainersPredictionMap
func (*ContainersPredictionMap) Merge ¶
func (c *ContainersPredictionMap) Merge(in *ContainersPredictionMap)
Merge Merge current ContainersPredictionMap with input ContainersPredictionMap
type DAO ¶
type DAO interface { ListPodPredictions(ListPodPredictionsRequest) ([]*datahub_v1alpha1.PodPrediction, error) CreateContainerPredictions(in *datahub_v1alpha1.CreatePodPredictionsRequest) error FillPodPredictions(predictions []*datahub_v1alpha1.PodPrediction, fillDays int64) error ListNodePredictions(ListNodePredictionsRequest) ([]*datahub_v1alpha1.NodePrediction, error) CreateNodePredictions(in *datahub_v1alpha1.CreateNodePredictionsRequest) error }
DAO DAO interface of prediction
type IsScheduled ¶
type IsScheduled = bool
IsScheduled Specified if the node prediction is scheduled
type IsScheduledNodePredictionMap ¶
type IsScheduledNodePredictionMap map[IsScheduled]*NodePrediction
IsScheduledNodePredictionMap Nodes' Prediction map
type ListNodePredictionsRequest ¶
type ListNodePredictionsRequest struct { NodeNames []string Granularity int64 dao.QueryCondition }
ListNodePredictionsRequest ListNodePredictionsRequest
type ListPodPredictionsRequest ¶
type ListPodPredictionsRequest struct { Namespace string PodName string Granularity int64 dao.QueryCondition }
ListPodPredictionsRequest ListPodPredictionsRequest
type NodePrediction ¶
type NodePrediction struct { NodeName metadata.NodeName IsScheduled bool Predictions map[metric.NodeMetricType][]metric.Sample }
NodePrediction Prediction model to represent one node Prediction
func (*NodePrediction) Merge ¶
func (n *NodePrediction) Merge(in *NodePrediction)
Merge Merge current NodePrediction with input NodePrediction
type NodesPredictionMap ¶
type NodesPredictionMap map[metadata.NodeName]*IsScheduledNodePredictionMap
NodesPredictionMap Nodes' Prediction map
func (*NodesPredictionMap) AddNodePrediction ¶
func (n *NodesPredictionMap) AddNodePrediction(nodePrediction *NodePrediction)
AddNodePrediction Add node Prediction into NodesPredictionMap
type PodPrediction ¶
type PodPrediction struct { Namespace metadata.NamespaceName PodName metadata.PodName ContainersPredictionMap *ContainersPredictionMap }
PodPrediction Prediction model to represent one pod's Prediction
func (*PodPrediction) Merge ¶
func (p *PodPrediction) Merge(in *PodPrediction)
Merge Merge current PodPrediction with input PodPrediction
func (PodPrediction) NamespacePodName ¶
func (p PodPrediction) NamespacePodName() metadata.NamespacePodName
NamespacePodName Return identity of the pod Prediction
type PodsPredictionMap ¶
type PodsPredictionMap map[metadata.NamespacePodName]*PodPrediction
PodsPredictionMap Pods' Prediction map
func (*PodsPredictionMap) AddContainerPrediction ¶
func (p *PodsPredictionMap) AddContainerPrediction(c *ContainerPrediction)
AddContainerPrediction Add container Prediction into PodsPredictionMap