Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncRegisterer ¶
type FuncRegisterer struct {
// contains filtered or unexported fields
}
FuncRegisterer allows a registerer to be defined by passing in functions. This is used for proxies.
func NewFuncRegisterer ¶
func NewFuncRegisterer(route RegisterRouteFunc, routesWithPrefix RegisterRoutesWithPrefixFunc) *FuncRegisterer
func (FuncRegisterer) RegisterRoute ¶
func (r FuncRegisterer) RegisterRoute(path string, handler http.Handler, methods ...string)
func (FuncRegisterer) RegisterRoutesWithPrefix ¶
func (r FuncRegisterer) RegisterRoutesWithPrefix(path string, handler http.Handler, methods ...string)
type MuxRegisterer ¶
type MuxRegisterer struct {
// contains filtered or unexported fields
}
MuxRegisterer wraps around a mux router. This is used for proxies deployed in Grafana Cloud.
func NewMuxRegisterer ¶
func NewMuxRegisterer(router *mux.Router) *MuxRegisterer
func (*MuxRegisterer) RegisterRoute ¶
func (r *MuxRegisterer) RegisterRoute(path string, handler http.Handler, methods ...string)
func (*MuxRegisterer) RegisterRoutesWithPrefix ¶
func (r *MuxRegisterer) RegisterRoutesWithPrefix(prefix string, handler http.Handler, methods ...string)
type RegisterRouteFunc ¶
type Registerer ¶
type Registerer interface { RegisterRoute(path string, handler http.Handler, methods ...string) RegisterRoutesWithPrefix(prefix string, handler http.Handler, methods ...string) }
Registerer provides a set of methods for registering API routes. An interface is defined as route registration differs depending on where the proxy is running.
Click to show internal directories.
Click to hide internal directories.