clusterstatus

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContainerTime is the time that container information is saved to the measurement
	ContainerTime containerTag = "time"
	// ContainerNamespace is the container namespace
	ContainerNamespace containerTag = "namespace"
	// ContainerPodName is the name of pod that container is running in
	ContainerPodName containerTag = "pod_name"
	// ContainerAlamedaScalerNamespace is the namespace of AlamedaScaler that container belongs to
	ContainerAlamedaScalerNamespace containerTag = "alameda_scaler_namespace"
	// ContainerAlamedaScalerName is the name of AlamedaScaler that container belongs to
	ContainerAlamedaScalerName containerTag = "alameda_scaler_name"
	// ContainerNodeName is the name of node that container is running in
	ContainerNodeName containerTag = "node_name"
	// ContainerName is the container name
	ContainerName containerTag = "name"

	// ContainerResourceRequestCPU is CPU request of the container
	ContainerResourceRequestCPU containerField = "resource_request_cpu"
	// ContainerResourceRequestMemory is memory request of the container
	ContainerResourceRequestMemory containerField = "resource_request_memroy"
	// ContainerResourceLimitCPU is CPU limit of the container
	ContainerResourceLimitCPU containerField = "resource_limit_cpu"
	// ContainerResourceLimitMemory is memory limit of the container
	ContainerResourceLimitMemory containerField = "resource_limit_memory"
	// ContainerIsAlameda is the state that container is predicted or not
	ContainerIsAlameda containerField = "is_alameda"
	// ContainerIsDeleted is the state that container is deleted or not
	ContainerIsDeleted containerField = "is_deleted"
	// ContainerPolicy is the prediction policy of container
	ContainerPolicy containerField = "policy"
	// ContainerPodCreateTime is the creation time of pod
	ContainerPodCreateTime containerField = "pod_create_time"
	// ContainerResourceLink is the resource link of pod
	ContainerResourceLink containerField = "resource_link"
	// ContainerTopControllerName is top controller name of the pod
	ContainerTopControllerName containerField = "top_controller_name"
	// ContainerTopControllerKind is top controller kind of the pod
	ContainerTopControllerKind containerField = "top_controller_kind"
	// ContainerUsedRecommendationID is the recommendation id that the pod applied
	ContainerUsedRecommendationID containerField = "used_recommendation_id"
)
View Source
const (
	// NodeTime is the time node information is inserted to databse
	NodeTime nodeTag = "time"
	// NodeName is the name of node
	NodeName nodeTag = "name"

	// NodeGroup is node group name
	NodeGroup nodeField = "group"
	// NodeInCluster is the state node is in cluster or not
	NodeInCluster nodeField = "in_cluster"
	// NodeCPUCores is the amount of cores in node
	NodeCPUCores nodeField = "node_cpu_cores"
	// NodeMemoryBytes is the amount of momory bytes in node
	NodeMemoryBytes nodeField = "node_memory_bytes"
)

Variables

View Source
var (
	// NodeTags list tags of node measurement
	NodeTags = []nodeTag{NodeTime, NodeName}
	// NodeFields list fields of node measurement
	NodeFields = []nodeField{NodeGroup, NodeInCluster}
)

Functions

This section is empty.

Types

type ContainerEntity

type ContainerEntity struct {
	Time                   time.Time
	Namespace              *string
	PodName                *string
	AlamedaScalerNamespace *string
	AlamedaScalerName      *string
	NodeName               *string
	Name                   *string
	ResourceRequestCPU     *float64
	ResourceRequestMemory  *int64
	ResourceLimitCPU       *float64
	ResourceLimitMemory    *int64
	IsAlameda              *bool
	IsDeleted              *bool
	Policy                 *string
	PodCreatedTime         *int64
	ResourceLink           *string
	TopControllerName      *string
	TopControllerKind      *string
	UsedRecommendationID   *string
}

ContainerEntity Entity in database

func NewContainerEntityFromMap

func NewContainerEntityFromMap(data map[string]string) ContainerEntity

NewContainerEntityFromMap Build entity from map

func (ContainerEntity) InfluxDBPoint

func (e ContainerEntity) InfluxDBPoint(measurementName string) (*influxdb_client.Point, error)

type NodeEntity added in v0.3.0

type NodeEntity struct {
	Time        time.Time
	Name        *string
	NodeGroup   *string
	IsInCluster *bool
	CPUCores    *int64
	MemoryBytes *int64
}

NodeEntity is entity in database

func NewNodeEntityFromMap added in v0.3.0

func NewNodeEntityFromMap(data map[string]string) NodeEntity

NewNodeEntityFromMap Build entity from map

func (NodeEntity) BuildDatahubNode added in v0.3.0

func (e NodeEntity) BuildDatahubNode() *datahub_v1alpha1.Node

func (NodeEntity) InfluxDBPoint added in v0.3.0

func (e NodeEntity) InfluxDBPoint(measurementName string) (*influxdb_client.Point, error)

Jump to

Keyboard shortcuts

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