cms

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// metrics
	K8S_WORKLOAD_CPUUTIL          = "k8s_workload_cpu_util"
	K8S_WORKLOAD_CPULIMIT         = "k8s_workload_cpu_limit"
	K8S_WORKLOAD_CPUREQUEST       = "k8s_workload_cpu_request"
	K8S_WORKLOAD_MEMORYUSAGE      = "k8s_workload_memory_usage"
	K8S_WORKLOAD_MEMORYREQUEST    = "k8s_workload_memory_request"
	K8S_WORKLOAD_MEMORYLIMIT      = "k8s_workload_memory_limit"
	K8S_WORKLOAD_MEMORYWORKINGSET = "k8s_workload_memory_working_set"
	K8S_WORKLOAD_MEMORYRSS        = "k8s_workload_memory_rss"
	K8S_WORKLOAD_MEMORYCACHE      = "k8s_workload_memory_cache"
	K8S_WORKLOAD_NETWORKTXRATE    = "k8s_workload_network_tx_rate"
	K8S_WORKLOAD_NETWORKRXRATE    = "k8s_workload_network_rx_rate"
	K8S_WORKLOAD_NETWORKTXERRORS  = "k8s_workload_network_tx_errors"
	K8S_WORKLOAD_NETWORKRXERRORS  = "k8s_workload_network_rx_errors"
)
View Source
const (
	// global const
	DEFAULT_ACS_KUBERNETES    = "acs_kubernetes"
	K8S_DEFAULT_WORKLOAD_TYPE = "Deployment"

	// params
	K8S_NAMESPACE     = "k8s.workload.namespace"
	K8S_WORKLOAD_TYPE = "k8s.workload.type"
	K8S_WORKLOAD_NAME = "k8s.workload.name"
	K8S_CLUSTER_ID    = "k8s.cluster.id"
	K8S_PERIOD        = "k8s.period"
	//
	MIN_PERIOD = 60
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CMSGlobalParams

type CMSGlobalParams struct {
	Period int
}

type CMSMetricParams

type CMSMetricParams struct {
	CMSGlobalParams
	Namespace    string
	ClusterId    string
	WorkloadType string
	WorkloadName string
}

type CMSMetricSource

type CMSMetricSource struct{}

func NewCMSMetricSource

func NewCMSMetricSource() *CMSMetricSource

register cms metric source to provider

func (*CMSMetricSource) Client

func (cs *CMSMetricSource) Client() (client *cms.Client, err error)

func (*CMSMetricSource) GetExternalMetric

func (cs *CMSMetricSource) GetExternalMetric(info p.ExternalMetricInfo, namespace string, requirements labels.Requirements) (values []external_metrics.ExternalMetricValue, err error)

func (*CMSMetricSource) GetExternalMetricInfoList

func (cs *CMSMetricSource) GetExternalMetricInfoList() []p.ExternalMetricInfo

type DataPoint

type DataPoint struct {
	Timestamp int64   `json:"timestamp"`
	UserId    string  `json:"userId"`
	GroupId   string  `json:"groupId"`
	Value     float64 `json:"value"`
	Sum       float64 `json:"Sum"`
	Average   float64 `json:"average"`
	Maximum   float64 `json:"maximum"`
	Minimum   float64 `json:"minimum"`
}

Jump to

Keyboard shortcuts

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