pcm_models

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCpuUsageAverageQuery

func BuildCpuUsageAverageQuery(p *PrometheusQueryParams) string

CPU Usage Average (OK)

func BuildDownloadThroughputQuery

func BuildDownloadThroughputQuery(p *PrometheusQueryParams) string

DownloadThrough

func BuildMemRateQuery

func BuildMemRateQuery(p *PrometheusQueryParams) string

Memory rate (OK)

func BuildMemUsageAverageQuery

func BuildMemUsageAverageQuery(p *PrometheusQueryParams) string

Memory Usage average (OK)

func BuildMemUsageQuery

func BuildMemUsageQuery(p *PrometheusQueryParams) string

Memory Usage (OK)

func BuildPodsByStatusQuery

func BuildPodsByStatusQuery(p *PrometheusQueryParams) string

Pods by Phase

func BuildResourceLimitQuery

func BuildResourceLimitQuery(p *PrometheusQueryParams) string

CPU and Momory resources limit (OK)

func BuildResourceRequestQuery

func BuildResourceRequestQuery(p *PrometheusQueryParams) string

CPU and Memory resources request (OK)

func BuildRunningPodsQuery

func BuildRunningPodsQuery(p *PrometheusQueryParams) string

Pods running

func BuildTotalThroughputQuery

func BuildTotalThroughputQuery(p *PrometheusQueryParams) string

UploadThrough ()

func BuildUploadThroughputQuery

func BuildUploadThroughputQuery(p *PrometheusQueryParams) string

UploadThrough ()

func UpdateContainerNameInPrometheusResultList

func UpdateContainerNameInPrometheusResultList(models *[]PrometheusResult, value string)

Types

type KubernetesPhase

type KubernetesPhase string
const (
	KubernetesPhase_PENDING   KubernetesPhase = "Pending"
	KubernetesPhase_RUNNING   KubernetesPhase = "Running"
	KubernetesPhase_SUCCEEDED KubernetesPhase = "Succeeded"
	KubernetesPhase_FAILED    KubernetesPhase = "Failed"
	KubernetesPhase_UNKNOWN   KubernetesPhase = "Unknown"
)

type MetricType

type MetricType string
const (
	MetricType_CPU_USAGE                  MetricType = "cpu-usage"
	MetricType_MEMORY_USAGE               MetricType = "mem-usage"
	MetricType_CPU_USAGE_AVERAGE          MetricType = "cpu-average"
	MetricType_MEMORY_USAGE_AVERAGE       MetricType = "mem-average"
	MetricType_CPU_LIMIT                  MetricType = "cpu-limit"
	MetricType_MEMORY_LIMIT               MetricType = "men-limit"
	MetricType_CPU_REQUEST                MetricType = "cpu-request"
	MetricType_MEMORY_REQUEST             MetricType = "men-request"
	MetricType_POD_STATUS                 MetricType = "pod-status"
	MetricType_RUNNING_POD                MetricType = "running-pod"
	MetricType_TOTAL_THROUGPUT_AVERAGE    MetricType = "throughput-average"
	MetricType_UPLOAD_THROUGPUT_AVERAGE   MetricType = "upload-throughput-average"
	MetricType_DOWNLOAD_THROUGPUT_AVERAGE MetricType = "download-throughput-average"
)

type NwdafPacketCaptureMetric

type NwdafPacketCaptureMetric struct {
	CpuUsage  float64    `json:"cpu_usage" yaml:"cpu_usage" bson:"cpu_usage"`
	MemUsage  float64    `json:"mem_usage" yaml:"mem_usage" bson:"mem_usage"`
	CpuLimit  float64    `json:"cpu_limit" yaml:"cpu_limit" bson:"cpu_limit"`
	MemLimit  float64    `json:"mem_limit" yaml:"mem_limit" bson:"mem_limit"`
	Timestamp *time.Time `json:"timestamp" yaml:"timestamp" bson:"timestamp"`
}

type NwdafPacketCaptureResponse

type NwdafPacketCaptureResponse struct {
	Metrics   []NwdafPacketCaptureMetric `json:"metrics" yaml:"metrics" bson:"metrics"`
	NfType    models.NfType              `json:"nfType,omitempty" yaml:"nfType" bson:"nfType" mapstructure:"nfType"`
	NfService string                     `json:"nfService,omitempty" yaml:"nfService" bson:"nfService" mapstructure:"nfService"`
}

type PrometheusQueryParams

type PrometheusQueryParams struct {
	Namespace    string `json:"namespace"`
	Pod          string `json:"pod"`
	Container    string `json:"container"`
	TargetPeriod string `json:"targetPeriod"`
	Offset       string `json:"offset"`
	Unit         string `json:"unit"`
	Instance     string `json:"instance"`
	Phase        string `json:"phase"`
}

type PrometheusResult

type PrometheusResult struct {
	Timestamp  float64    `json:"timestamp"`
	Value      float64    `json:"value"`
	MetricType MetricType `json:"metric"`
	Namespace  string     `json:"namespace"`
	Pod        string     `json:"pod"`
	Container  string     `json:"container"`
	Phase      string     `json:"phase"`
	Uid        string     `json:"uid"`
}

func FindPodByContainer

func FindPodByContainer(pods []PrometheusResult, container string) *PrometheusResult

func NewPrometheusResult

func NewPrometheusResult() PrometheusResult

type PrometheusUnit

type PrometheusUnit string
const (
	PrometheusUnit_CORE PrometheusUnit = "core"
	PrometheusUnit_BYTE PrometheusUnit = "byte"
)

Jump to

Keyboard shortcuts

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