handlers

package
v0.0.0-...-8b5a9de Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryNodeMetricsHandler

func QueryNodeMetricsHandler(database *pgxpool.Pool) gin.HandlerFunc

QueryNodeMetricsHandler handles the /api/metrics/v1/nodes endpoint, querying node_daily_summary

func QueryPodMetricsHandler

func QueryPodMetricsHandler(database *pgxpool.Pool) gin.HandlerFunc

QueryPodMetricsHandler handles the /api/metrics/v1/pods endpoint, querying pod_daily_summary

func UploadHandler

func UploadHandler(database *pgxpool.Pool) gin.HandlerFunc

Types

type NodeMetricsQueryParams

type NodeMetricsQueryParams struct {
	StartDate   string `form:"start_date"`
	EndDate     string `form:"end_date"`
	ClusterID   string `form:"cluster_id"`
	ClusterName string `form:"cluster_name"`
	NodeType    string `form:"node_type"`
	Limit       int    `form:"limit,default=100"`
	Offset      int    `form:"offset,default=0"`
}

type PodMetricsQueryParams

type PodMetricsQueryParams struct {
	StartDate   string `form:"start_date"`
	EndDate     string `form:"end_date"`
	ClusterID   string `form:"cluster_id"`
	ClusterName string `form:"cluster_name"`
	Namespace   string `form:"namespace"`
	PodName     string `form:"pod_name"`
	Component   string `form:"component"`
	Limit       int    `form:"limit,default=100"`
	Offset      int    `form:"offset,default=0"`
}

Jump to

Keyboard shortcuts

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