Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendError ¶
func SendError(w http.ResponseWriter, r *http.Request, msg string, code int, notPromHandler NotPromHandlerFunc)
SendError sends a Prometheus compatible error message and logs
Types ¶
type Error ¶
type Error struct { Status string `json:"status"` Data map[string]interface{} `json:"datay"` ErrorType string `json:"error_type"` Error string `json:"error"` Warnings []string `json:"warnings"` }
Error Struct for a Prometheus error
type NotPromHandlerFunc ¶
NotPromHandlerFunc is a function that is called if the error message is not displayed in Prometheus
Click to show internal directories.
Click to hide internal directories.