types

package
v4.5.2003+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationPrediction

type ApplicationPrediction struct {
	ObjectMeta           metadata.ObjectMeta
	PredictionRaw        map[enumconv.MetricType]*types.PredictionMetricData
	PredictionUpperBound map[enumconv.MetricType]*types.PredictionMetricData
	PredictionLowerBound map[enumconv.MetricType]*types.PredictionMetricData
}

ApplicationPrediction Prediction model to represent one application Prediction

func NewApplicationPrediction

func NewApplicationPrediction() *ApplicationPrediction

func (*ApplicationPrediction) AddLowerBoundSample

func (n *ApplicationPrediction) AddLowerBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ApplicationPrediction) AddRawSample

func (n *ApplicationPrediction) AddRawSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ApplicationPrediction) AddUpperBoundSample

func (n *ApplicationPrediction) AddUpperBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ApplicationPrediction) Identifier

func (n *ApplicationPrediction) Identifier() string

func (*ApplicationPrediction) Merge

Merge Merge current ApplicationPrediction with input ApplicationPrediction

type ApplicationPredictionMap

type ApplicationPredictionMap struct {
	MetricMap map[string]*ApplicationPrediction
}

ApplicationsPredictionMap Applications' Prediction map

func NewApplicationPredictionMap

func NewApplicationPredictionMap() ApplicationPredictionMap

func (*ApplicationPredictionMap) AddApplicationPrediction

func (n *ApplicationPredictionMap) AddApplicationPrediction(applicationPrediction *ApplicationPrediction)

AddApplicationPrediction Add application Prediction into ApplicationsPredictionMap

type ApplicationPredictionsDAO

type ApplicationPredictionsDAO interface {
	CreatePredictions(ApplicationPredictionMap) error
	ListPredictions(ListApplicationPredictionsRequest) (ApplicationPredictionMap, error)
}

type ClusterPrediction

type ClusterPrediction struct {
	ObjectMeta           metadata.ObjectMeta
	PredictionRaw        map[enumconv.MetricType]*types.PredictionMetricData
	PredictionUpperBound map[enumconv.MetricType]*types.PredictionMetricData
	PredictionLowerBound map[enumconv.MetricType]*types.PredictionMetricData
}

ClusterPrediction Prediction model to represent one cluster Prediction

func NewClusterPrediction

func NewClusterPrediction() *ClusterPrediction

func (*ClusterPrediction) AddLowerBoundSample

func (n *ClusterPrediction) AddLowerBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ClusterPrediction) AddRawSample

func (n *ClusterPrediction) AddRawSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ClusterPrediction) AddUpperBoundSample

func (n *ClusterPrediction) AddUpperBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ClusterPrediction) Merge

func (n *ClusterPrediction) Merge(in *ClusterPrediction)

Merge Merge current ClusterPrediction with input ClusterPrediction

type ClusterPredictionMap

type ClusterPredictionMap struct {
	MetricMap map[string]*ClusterPrediction
}

ClustersPredictionMap Clusters' Prediction map

func NewClusterPredictionMap

func NewClusterPredictionMap() ClusterPredictionMap

func (*ClusterPredictionMap) AddClusterPrediction

func (n *ClusterPredictionMap) AddClusterPrediction(clusterPrediction *ClusterPrediction)

AddClusterPrediction Add cluster Prediction into clustersPredictionMap

type ClusterPredictionsDAO

type ClusterPredictionsDAO interface {
	CreatePredictions(ClusterPredictionMap) error
	ListPredictions(ListClusterPredictionsRequest) (ClusterPredictionMap, error)
}

type ContainerPrediction

type ContainerPrediction struct {
	ContainerName        metadata.ContainerName
	PodName              metadata.PodName
	Namespace            metadata.NamespaceName
	NodeName             metadata.NodeName
	ClusterName          metadata.ClusterName
	PredictionRaw        map[enumconv.MetricType]*types.PredictionMetricData
	PredictionUpperBound map[enumconv.MetricType]*types.PredictionMetricData
	PredictionLowerBound map[enumconv.MetricType]*types.PredictionMetricData
}

ContainerPrediction Prediction model to represent one container Prediction

func NewContainerPrediction

func NewContainerPrediction() *ContainerPrediction

func (*ContainerPrediction) AddLowerBoundSample

func (c *ContainerPrediction) AddLowerBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ContainerPrediction) AddRawSample

func (c *ContainerPrediction) AddRawSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ContainerPrediction) AddUpperBoundSample

func (c *ContainerPrediction) AddUpperBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ContainerPrediction) BuildPodPrediction

func (c *ContainerPrediction) BuildPodPrediction() *PodPrediction

BuildPodPrediction Build PodPrediction consist of the receiver in ContainersPredictionMap.

func (*ContainerPrediction) Merge

func (*ContainerPrediction) NamespacePodContainerName

func (c *ContainerPrediction) NamespacePodContainerName() metadata.NamespacePodContainerName

NamespacePodContainerName Return identity of the container Prediction.

type ContainerPredictionMap

type ContainerPredictionMap struct {
	MetricMap map[metadata.NamespacePodContainerName]*ContainerPrediction
}

ContainersPredictionMap Containers Prediction map

func NewContainerPredictionMap

func NewContainerPredictionMap() ContainerPredictionMap

func (*ContainerPredictionMap) AddContainerPrediction

func (c *ContainerPredictionMap) AddContainerPrediction(containerPrediction *ContainerPrediction)

func (*ContainerPredictionMap) BuildPodsPredictionMap

func (c *ContainerPredictionMap) BuildPodsPredictionMap() PodPredictionMap

BuildPodsPredictionMap Build PodsPredictionMap base on current ContainersPredictionMap

type ContainerPredictionSample

type ContainerPredictionSample struct {
	ContainerName metadata.ContainerName
	PodName       metadata.PodName
	Namespace     metadata.NamespaceName
	NodeName      metadata.NodeName
	ClusterName   metadata.ClusterName
	MetricType    enumconv.MetricType
	MetricKind    enumconv.MetricKind
	Predictions   *types.PredictionMetricData
}

type ControllerPrediction

type ControllerPrediction struct {
	ObjectMeta           metadata.ObjectMeta
	Kind                 string
	PredictionRaw        map[enumconv.MetricType]*types.PredictionMetricData
	PredictionUpperBound map[enumconv.MetricType]*types.PredictionMetricData
	PredictionLowerBound map[enumconv.MetricType]*types.PredictionMetricData
}

ControllerPrediction Prediction model to represent one controller Prediction

func NewControllerPrediction

func NewControllerPrediction() *ControllerPrediction

func (*ControllerPrediction) AddLowerBoundSample

func (n *ControllerPrediction) AddLowerBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ControllerPrediction) AddRawSample

func (n *ControllerPrediction) AddRawSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ControllerPrediction) AddUpperBoundSample

func (n *ControllerPrediction) AddUpperBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*ControllerPrediction) Identifier

func (n *ControllerPrediction) Identifier() string

func (*ControllerPrediction) Merge

Merge Merge current ControllerPrediction with input ControllerPrediction

type ControllerPredictionMap

type ControllerPredictionMap struct {
	MetricMap map[string]*ControllerPrediction
}

ControllersPredictionMap Controllers' Prediction map

func NewControllerPredictionMap

func NewControllerPredictionMap() ControllerPredictionMap

func (*ControllerPredictionMap) AddControllerPrediction

func (n *ControllerPredictionMap) AddControllerPrediction(controllerPrediction *ControllerPrediction)

AddControllerPrediction Add Controller Prediction into ControllersPredictionMap

type ControllerPredictionsDAO

type ControllerPredictionsDAO interface {
	CreatePredictions(ControllerPredictionMap) error
	ListPredictions(ListControllerPredictionsRequest) (ControllerPredictionMap, error)
}

type ListApplicationPredictionsRequest

type ListApplicationPredictionsRequest struct {
	common.QueryCondition
	ObjectMeta   []metadata.ObjectMeta
	ModelId      string
	PredictionId string
	Granularity  int64
}

ListApplicationPredictionsRequest ListApplicationPredictionsRequest

func NewListApplicationPredictionRequest

func NewListApplicationPredictionRequest() ListApplicationPredictionsRequest

type ListClusterPredictionsRequest

type ListClusterPredictionsRequest struct {
	common.QueryCondition
	ObjectMeta   []metadata.ObjectMeta
	ModelId      string
	PredictionId string
	Granularity  int64
}

ListClusterPredictionsRequest ListClusterPredictionsRequest

func NewListClusterPredictionRequest

func NewListClusterPredictionRequest() ListClusterPredictionsRequest

type ListControllerPredictionsRequest

type ListControllerPredictionsRequest struct {
	common.QueryCondition
	ObjectMeta   []metadata.ObjectMeta
	ModelId      string
	PredictionId string
	Granularity  int64
	Kind         string
}

ListControllerPredictionsRequest ListControllerPredictionsRequest

func NewListControllerPredictionRequest

func NewListControllerPredictionRequest() ListControllerPredictionsRequest

type ListNamespacePredictionsRequest

type ListNamespacePredictionsRequest struct {
	common.QueryCondition
	ObjectMeta   []metadata.ObjectMeta
	ModelId      string
	PredictionId string
	Granularity  int64
}

ListNamespacePredictionsRequest ListNamespacePredictionsRequest

func NewListNamespacePredictionRequest

func NewListNamespacePredictionRequest() ListNamespacePredictionsRequest

type ListNodePredictionsRequest

type ListNodePredictionsRequest struct {
	common.QueryCondition
	ObjectMeta   []metadata.ObjectMeta
	ModelId      string
	PredictionId string
	Granularity  int64
}

ListNodePredictionsRequest ListNodePredictionsRequest

func NewListNodePredictionRequest

func NewListNodePredictionRequest() ListNodePredictionsRequest

type ListPodPredictionsRequest

type ListPodPredictionsRequest struct {
	DBCommon.QueryCondition
	ObjectMeta   []metadata.ObjectMeta
	ModelId      string
	PredictionId string
	Granularity  int64
	FillDays     int64
}

ListPodPredictionsRequest ListPodPredictionsRequest

func NewListPodPredictionsRequest

func NewListPodPredictionsRequest() ListPodPredictionsRequest

type NamespacePrediction

type NamespacePrediction struct {
	ObjectMeta           metadata.ObjectMeta
	PredictionRaw        map[enumconv.MetricType]*types.PredictionMetricData
	PredictionUpperBound map[enumconv.MetricType]*types.PredictionMetricData
	PredictionLowerBound map[enumconv.MetricType]*types.PredictionMetricData
}

NamespacePrediction Prediction model to represent one namespace Prediction

func NewNamespacePrediction

func NewNamespacePrediction() *NamespacePrediction

func (*NamespacePrediction) AddLowerBoundSample

func (n *NamespacePrediction) AddLowerBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*NamespacePrediction) AddRawSample

func (n *NamespacePrediction) AddRawSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*NamespacePrediction) AddUpperBoundSample

func (n *NamespacePrediction) AddUpperBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*NamespacePrediction) Identifier

func (n *NamespacePrediction) Identifier() string

func (*NamespacePrediction) Merge

Merge Merge current NamespacePrediction with input NamespacePrediction

type NamespacePredictionMap

type NamespacePredictionMap struct {
	MetricMap map[string]*NamespacePrediction
}

NamespacesPredictionMap Namespaces' Prediction map

func NewNamespacePredictionMap

func NewNamespacePredictionMap() NamespacePredictionMap

func (*NamespacePredictionMap) AddNamespacePrediction

func (n *NamespacePredictionMap) AddNamespacePrediction(namespacePrediction *NamespacePrediction)

AddNamespacePrediction Add namespace Prediction into namespacesPredictionMap

type NamespacePredictionsDAO

type NamespacePredictionsDAO interface {
	CreatePredictions(NamespacePredictionMap) error
	ListPredictions(ListNamespacePredictionsRequest) (NamespacePredictionMap, error)
}

type NodePrediction

type NodePrediction struct {
	ObjectMeta           metadata.ObjectMeta
	IsScheduled          bool
	PredictionRaw        map[enumconv.MetricType]*types.PredictionMetricData
	PredictionUpperBound map[enumconv.MetricType]*types.PredictionMetricData
	PredictionLowerBound map[enumconv.MetricType]*types.PredictionMetricData
}

NodePrediction Prediction model to represent one node Prediction

func NewNodePrediction

func NewNodePrediction() *NodePrediction

func (*NodePrediction) AddLowerBoundSample

func (n *NodePrediction) AddLowerBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*NodePrediction) AddRawSample

func (n *NodePrediction) AddRawSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*NodePrediction) AddUpperBoundSample

func (n *NodePrediction) AddUpperBoundSample(metricType enumconv.MetricType, granularity int64, sample types.PredictionSample)

func (*NodePrediction) Identifier

func (n *NodePrediction) Identifier() string

func (*NodePrediction) Merge

func (n *NodePrediction) Merge(in *NodePrediction)

Merge Merge current NodePrediction with input NodePrediction

type NodePredictionMap

type NodePredictionMap struct {
	MetricMap map[metadata.NodeName]*NodePrediction
}

NodesPredictionMap Nodes' Prediction map

func NewNodePredictionMap

func NewNodePredictionMap() NodePredictionMap

func (*NodePredictionMap) AddNodePrediction

func (n *NodePredictionMap) AddNodePrediction(nodePrediction *NodePrediction)

AddNodePrediction Add node Prediction into NodesPredictionMap

type NodePredictionsDAO

type NodePredictionsDAO interface {
	CreatePredictions(NodePredictionMap) error
	ListPredictions(ListNodePredictionsRequest) (NodePredictionMap, error)
	FillPredictions(predictions []*ApiPredictions.NodePrediction, fillDays int64) error
}

type PodPrediction

type PodPrediction struct {
	ObjectMeta             metadata.ObjectMeta
	ContainerPredictionMap ContainerPredictionMap
}

PodPrediction Prediction model to represent one pod's Prediction

func NewPodPrediction

func NewPodPrediction() *PodPrediction

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 PodPredictionMap

type PodPredictionMap struct {
	MetricMap map[metadata.NamespacePodName]*PodPrediction
}

PodsPredictionMap Pods' Prediction map

func NewPodPredictionMap

func NewPodPredictionMap() PodPredictionMap

func (*PodPredictionMap) AddContainerPrediction

func (p *PodPredictionMap) AddContainerPrediction(c *ContainerPrediction)

AddContainerPrediction Add container Prediction into PodsPredictionMap

func (*PodPredictionMap) AddPodPrediction

func (p *PodPredictionMap) AddPodPrediction(podPrediction *PodPrediction)

AddPodPrediction Add pod Prediction into PodsPredictionMap

type PodPredictionsDAO

type PodPredictionsDAO interface {
	CreatePredictions(PodPredictionMap) error
	ListPredictions(ListPodPredictionsRequest) (PodPredictionMap, error)
	FillPredictions(predictions []*ApiPredictions.PodPrediction, fillDays int64) error
}

DAO DAO interface of prediction

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL