Documentation ¶
Index ¶
- Variables
- func RegisterControlRoutes(router *mux.Router)
- func RegisterReportPostHandler(a Adder, router *mux.Router)
- func TopologyHandler(c Reporter, preRoutes *mux.Router, postRoutes http.Handler) http.Handler
- func URLMatcher(pattern string) mux.MatcherFunc
- type APINode
- type APITopology
- type APITopologyDesc
- type APITopologyOption
- type Adder
- type Collector
- type PipeRouter
- type Reporter
Constants ¶
This section is empty.
Variables ¶
var ( // Version - set at buildtime. Version = "dev" // UniqueID - set at runtime. UniqueID = "0" )
Functions ¶
func RegisterControlRoutes ¶
RegisterControlRoutes registers the various control routes with a http mux.
func RegisterReportPostHandler ¶
RegisterReportPostHandler registers the handler for report submission
func TopologyHandler ¶ added in v0.12.0
TopologyHandler registers the various topology routes with a http mux.
The returned http.Handler has to be passed directly to http.ListenAndServe, and cannot be nested inside another gorrilla.mux.
Routes which should be matched before the topology routes should be added to a router and passed in preRoutes. Routes to be matches after topology routes should be added to a router and passed to postRoutes.
func URLMatcher ¶
func URLMatcher(pattern string) mux.MatcherFunc
URLMatcher uses request.RequestURI (the raw, unparsed request) to attempt to match pattern. It does this as go's URL.Parse method is broken, and mistakenly unescapes the Path before parsing it. This breaks %2F (encoded forward slashes) in the paths.
Types ¶
type APITopology ¶
type APITopology struct {
Nodes render.RenderableNodes `json:"nodes"`
}
APITopology is returned by the /api/topology/{name} handler.
type APITopologyDesc ¶
type APITopologyDesc struct { Name string `json:"name"` Options map[string][]APITopologyOption `json:"options"` URL string `json:"url"` SubTopologies []APITopologyDesc `json:"sub_topologies,omitempty"` Stats topologyStats `json:"stats,omitempty"` // contains filtered or unexported fields }
APITopologyDesc is returned in a list by the /api/topology handler.
type APITopologyOption ¶
type APITopologyOption struct { Value string `json:"value"` Display string `json:"display"` Default bool `json:"default,omitempty"` // contains filtered or unexported fields }
APITopologyOption describes a ¶m=value to a given topology.
type Adder ¶
Adder is something that can accept reports. It's a convenient interface for parts of the app, and several experimental components.
type Collector ¶
A Collector is a Reporter and an Adder
func NewCollector ¶
NewCollector returns a collector ready for use.
type PipeRouter ¶
PipeRouter connects incoming and outgoing pipes.
func RegisterPipeRoutes ¶
func RegisterPipeRoutes(router *mux.Router) *PipeRouter
RegisterPipeRoutes registers the pipe routes