packetcapturemodule

package
v1.0.41 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuiildTargetPeriod

func BuiildTargetPeriod(num int64) string

func CreateClient

func CreateClient(pcmUri string) (apiClient v1.API, err error)

func ExecutePrometheusQuery

func ExecutePrometheusQuery(query string, metric models.MetricType, timeReq time.Time, pcmUri string) (metrics []models.PrometheusResult, err error)

func ExecutePrometheusQueryRange

func ExecutePrometheusQueryRange(query string, metric models.MetricType, startTime time.Time, endTime time.Time, step time.Duration, pcmUri string) (metrics []models.PrometheusResult, err error)

func GetCpuUsageAverage

func GetCpuUsageAverage(ns string, pod string, ctnr string, tp int64, offSet int64, timeReq time.Time, pcmUri string) ([]models.PrometheusResult, error)

func GetCpuUsageAverageRange

func GetCpuUsageAverageRange(ns string, pod string, ctnr string, tp int64, offSet int64, startTime time.Time, endTime time.Time, pcmUri string) ([]models.PrometheusResult, error)

func GetMemUsageAverage

func GetMemUsageAverage(ns string, pod string, ctnr string, tp int64, offSet int64, timeReq time.Time, pcmUri string) ([]models.PrometheusResult, error)

func GetMemUsageAverageRange

func GetMemUsageAverageRange(ns string, pod string, ctnr string, tp int64, offSet int64, startTime time.Time, endTime time.Time, pcmUri string) ([]models.PrometheusResult, error)

func GetPodsByPhase

func GetPodsByPhase(instance string, ns string, phase models.KubernetesPhase, timeReq time.Time, pcmUri string) ([]models.PrometheusResult, error)

func GetResourceLimit

func GetResourceLimit(ns string, pod string, ctnr string, unit models.PrometheusUnit, timeReq time.Time, pcmUri string) ([]models.PrometheusResult, error)

func GetResourceRequest

func GetResourceRequest(ns string, pod string, ctnr string, unit models.PrometheusUnit, timeReq time.Time, pcmUri string) ([]models.PrometheusResult, error)

func GetRunningPods

func GetRunningPods(instance string, ns string, ctnr string, timeReq time.Time, pcmUri string) ([]models.PrometheusResult, error)

func ProcessPrometheusMetricResult

func ProcessPrometheusMetricResult(result model.Value, metric models.MetricType) ([]models.PrometheusResult, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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