Documentation ¶
Overview ¶
Package handler http server handler functions
Package handler http server handler functions ¶
Package handler http server handler functions ¶
Package handler http server handler functions ¶
Package handler http server handler functions ¶
Package handler http server handler functions ¶
Package handler http server handler functions ¶
Package handler http server handler functions
Index ¶
- func Append(handlers ...Handler) http.HandlerFunc
- type APIHhandler
- func (h APIHhandler) DeleteData(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) DeleteTags(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) GetAlerts(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) GetAlertsStatus(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) GetData(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) GetExports(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) GetMetrics(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) GetMetricsHelper(w http.ResponseWriter, r *http.Request, argv map[string]string) ([]storage.Item, error)
- func (h APIHhandler) GetTenants(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) PostData(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) PostMQuery(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) PostQuery(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) PutMultiTags(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- func (h APIHhandler) PutTags(w http.ResponseWriter, r *http.Request, argv map[string]string) error
- type Authorization
- type BadRequest
- type Handler
- type Headers
- type Logger
- type Static
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Append ¶
func Append(handlers ...Handler) http.HandlerFunc
Append concat a list of Routers into the router routing table returns
http.HandlerFunc - the first http handler function to call
Types ¶
type APIHhandler ¶
type APIHhandler struct { Verbose bool Storage storage.Storage Alerts *alerts.AlertRules DefaultTenant string DefaultStartTime string }
APIHhandler common variables to be used by all APIHhandler functions
version the version of the Hawkular server we are mocking storage the storage to be used by the APIHhandler functions
func (APIHhandler) DeleteData ¶
func (h APIHhandler) DeleteData(w http.ResponseWriter, r *http.Request, argv map[string]string) error
DeleteData delete a list of metrics raw data
func (APIHhandler) DeleteTags ¶
func (h APIHhandler) DeleteTags(w http.ResponseWriter, r *http.Request, argv map[string]string) error
DeleteTags delete a tag
func (APIHhandler) GetAlerts ¶
func (h APIHhandler) GetAlerts(w http.ResponseWriter, r *http.Request, argv map[string]string) error
GetAlerts return a list of alerts
func (APIHhandler) GetAlertsStatus ¶
func (h APIHhandler) GetAlertsStatus(w http.ResponseWriter, r *http.Request, argv map[string]string) error
GetAlertsStatus return a json alerts status struct
func (APIHhandler) GetData ¶
func (h APIHhandler) GetData(w http.ResponseWriter, r *http.Request, argv map[string]string) error
GetData return a list of metrics raw / stat data
func (APIHhandler) GetExports ¶
func (h APIHhandler) GetExports(w http.ResponseWriter, r *http.Request, argv map[string]string) error
GetExports return a list of metrics if prmetheus export format
func (APIHhandler) GetMetrics ¶
func (h APIHhandler) GetMetrics(w http.ResponseWriter, r *http.Request, argv map[string]string) error
GetMetrics return a list of metrics definitions
func (APIHhandler) GetMetricsHelper ¶
func (h APIHhandler) GetMetricsHelper(w http.ResponseWriter, r *http.Request, argv map[string]string) ([]storage.Item, error)
GetMetricsHelper helper function to return a list of metrics definitions
func (APIHhandler) GetTenants ¶
func (h APIHhandler) GetTenants(w http.ResponseWriter, r *http.Request, argv map[string]string) error
GetTenants return a list of metrics tenants
func (APIHhandler) PostData ¶
func (h APIHhandler) PostData(w http.ResponseWriter, r *http.Request, argv map[string]string) error
PostData send timestamp, value to the storage
func (APIHhandler) PostMQuery ¶
func (h APIHhandler) PostMQuery(w http.ResponseWriter, r *http.Request, argv map[string]string) error
PostMQuery query data from storage + gauges
func (APIHhandler) PostQuery ¶
func (h APIHhandler) PostQuery(w http.ResponseWriter, r *http.Request, argv map[string]string) error
PostQuery query data from storage
func (APIHhandler) PutMultiTags ¶
func (h APIHhandler) PutMultiTags(w http.ResponseWriter, r *http.Request, argv map[string]string) error
PutMultiTags send tags pet dataItem - tag, value pairs to the storage
func (APIHhandler) PutTags ¶
func (h APIHhandler) PutTags(w http.ResponseWriter, r *http.Request, argv map[string]string) error
PutTags send tag, value pairs to the storage
type Authorization ¶
type Authorization struct { PublicPathRegex *regexp.Regexp Authorization string Verbose bool // contains filtered or unexported fields }
Authorization middleware that will authorize http requests
func (*Authorization) ServeHTTP ¶
func (a *Authorization) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP http serve func
func (*Authorization) SetNext ¶
func (a *Authorization) SetNext(h http.Handler)
SetNext set next http serve func
type BadRequest ¶
type BadRequest struct {
Verbose bool
}
BadRequest will be called if no route found
func (BadRequest) ServeHTTP ¶
func (b BadRequest) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP http serve func
func (*BadRequest) SetNext ¶
func (b *BadRequest) SetNext(_h http.Handler)
SetNext set next http serve func
type Headers ¶
type Headers struct { Verbose bool // contains filtered or unexported fields }
Headers middleware that will log http requests
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger middleware that will log http requests