prometheus_handler

package
v0.0.0-...-5961fbe Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrometheusHandler

func PrometheusHandler(c *gin.Context)

PrometheusHandler handles HTTP request that involves interactions with the Prometheus API

Types

type PrometheusDataField

type PrometheusDataField struct {
	ResultType string                      `json:"resultType"`
	Result     []PrometheusDataResultField `json:"result"`
}

PrometheusDataField represents the Data field from the PrometheusResponse struct

type PrometheusDataResultField

type PrometheusDataResultField struct {
	Metric map[string]interface{} `json:"metric"`
	Value  []interface{}          `json:"value"`
}

PrometheusDataResultField represents the Result field from the PrometheusDataField struct

type PrometheusResponse

type PrometheusResponse struct {
	Status string              `json:"status"`
	Data   PrometheusDataField `json:"data"`
}

PrometheusResponse represents the response from prometheus

type ReverseProxyResponseObject

type ReverseProxyResponseObject struct {
	Pod                           string `json:"pod"`
	Namespace                     string `json:"namespace"`
	CreatedByName                 string `json:"created_by_name"`
	Node                          string `json:"node"`
	KubePodCreated                string `json:"kube_pod_created"`
	KubePodCompleted              string `json:"kube_pod_completed"`
	ContainerCPUUsageSecondsTotal string `json:"container_cpu_usage_seconds_total"`
	ContainerMemoryUsageBytes     string `json:"container_memory_usage_bytes"`
	KubePodStatusPhase            string `json:"kube_pod_status_phase"`
}

ReverseProxyResponseObject represents the structure of the HTTP proxy response

Jump to

Keyboard shortcuts

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