Documentation ¶
Index ¶
- func ContainsCurlyBrackets(query string) bool
- func ContainsFunction(query string) bool
- func ContainsNameWithCurlyBrackets(query string) bool
- func ContainsSerie(query string) bool
- func ContainsString(query string) bool
- func CreateExpandRequest(query string) (*core.Node, error)
- func CreateFindRequest(query string, wildcards bool) (*core.Node, error)
- func CreateRenderRequest(target, from, until string) (*core.Node, error)
- func Expand(w http.ResponseWriter, r *http.Request)
- func Find(w http.ResponseWriter, r *http.Request)
- func Format(gtss []GTS, format string) ([]byte, error)
- func GetFunction(name string) (func(*core.Node, []string, map[string]string) (*core.Node, error), error)
- func Index(w http.ResponseWriter, r *http.Request)
- func Parse(target, from, until string, node *core.Node) (*core.Node, error)
- func ParseSerie(serie string) (string, map[string]string, error)
- func ParseTime(t []byte) (*time.Time, error)
- func Render(w http.ResponseWriter, r *http.Request)
- type Dygraph
- type ExpandQuery
- type FindQuery
- type Function
- type GTS
- type IndexQuery
- type JSON
- type Parser
- type RenderQuery
- type Ricksaw
- type RicksawElement
- type TreeJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsCurlyBrackets ¶
ContainsCurlyBrackets detect if the query contains curly brackets
func ContainsFunction ¶
ContainsFunction detect if the query contains a function
func ContainsNameWithCurlyBrackets ¶
ContainsNameWithCurlyBrackets detect if the query contains a name with curly brackets
func ContainsSerie ¶
ContainsSerie detect if the query contains a serie
func ContainsString ¶
ContainsString detect if the query contains a string
func CreateExpandRequest ¶
CreateExpandRequest return children of a serie given in parameter as mc2 tree
func CreateFindRequest ¶
CreateFindRequest return children of a serie given in parameter as mc2 tree
func CreateRenderRequest ¶
CreateRenderRequest return what you ask for as mc2 tree
func Expand ¶
func Expand(w http.ResponseWriter, r *http.Request)
Expand graphite handler (/metrics/expand) http://graphite-api.readthedocs.io/en/latest/api.html#metrics-expand https://github.com/graphite-project/graphite-web/blob/master/webapp/graphite/metrics/views.py#L172
func Find ¶
func Find(w http.ResponseWriter, r *http.Request)
Find graphite handler (/metrics/find) http://graphite-api.readthedocs.io/en/latest/api.html#metrics-find https://github.com/graphite-project/graphite-web/blob/master/webapp/graphite/metrics/views.py#L55
func GetFunction ¶
func GetFunction(name string) (func(*core.Node, []string, map[string]string) (*core.Node, error), error)
GetFunction return the function if exists
func Index ¶
func Index(w http.ResponseWriter, r *http.Request)
Index graphite handler (/metrics/index.json) http://graphite-api.readthedocs.io/en/latest/api.html#metrics-index-json https://github.com/graphite-project/graphite-web/blob/master/webapp/graphite/metrics/views.py#L35
func ParseSerie ¶
ParseSerie return the node corresponding to the query
func Render ¶
func Render(w http.ResponseWriter, r *http.Request)
Render graphite handler (/render) http://graphite-api.readthedocs.io/en/latest/api.html#the-render-api-render
Types ¶
type ExpandQuery ¶
type ExpandQuery struct { Query []string `json:"query" description:"The metrics query. Can be specified multiple times."` GroupByExpr int `json:"groupByExpr" description:"Whether to return a flat list of results or group them by query."` LeavesOnly int `json:"leavesOnly" description:"Whether to only return leaves or both branches and leaves."` JSONP string `json:"jsonp" description:"Wraps the response in a JSONP callback"` }
ExpandQuery which is used by the /metrics/expand path http://graphite-api.readthedocs.io/en/latest/api.html#metrics-expand
type FindQuery ¶
type FindQuery struct { Query string `json:"query" description:"The query to search for."` Format string `json:"format" description:"The output format to use."` Wildcards int `json:"wildcards" description:"Whether to add a wildcard result at the end or no."` From int64 `json:"from" description:"Epoch timestamp from which to consider metrics."` Until int64 `json:"until" description:"Epoch timestamp until which to consider metrics."` JSONP string `json:"jsonp" description:"Wraps the response in a JSONP callback"` }
FindQuery which is used by the /metrics/find path http://graphite-api.readthedocs.io/en/latest/api.html#metrics-find
type Function ¶
Function structure using to describe a graphite function call
func ParseFunction ¶
ParseFunction transform a graphite function into a struct
func ParseQuery ¶
ParseQuery and transform it into a call stack
type GTS ¶
type GTS struct { ClassName string `json:"c"` Labels map[string]string `json:"l"` Values [][]float64 `json:"v"` }
GTS is the format which is returned by warp10
func (*GTS) ToCSV ¶
ToCSV convert GTS to graphite csv format http://graphite-api.readthedocs.io/en/latest/api.html#csv
func (*GTS) ToDygraph ¶
ToDygraph convert GTS to graphite dygraph format http://graphite-api.readthedocs.io/en/latest/api.html#dygraph
func (*GTS) ToJSON ¶
ToJSON convert GTS to graphite JSON format http://graphite-api.readthedocs.io/en/latest/api.html#json
func (*GTS) ToRaw ¶
ToRaw convert GTS to graphite raw format http://graphite-api.readthedocs.io/en/latest/api.html#raw
func (*GTS) ToRicksaw ¶
ToRicksaw convert GTS to graphite ricksaw format http://graphite-api.readthedocs.io/en/latest/api.html#rickshaw
type IndexQuery ¶
type IndexQuery struct {
JSONP string `json:"jsonp" description:"Wraps the response in a JSONP callback"`
}
IndexQuery which is used by the /metrics/index.json path http://graphite-api.readthedocs.io/en/latest/api.html#metrics-index-json
type RenderQuery ¶
type RenderQuery struct { Target []string `` /* 151-byte string literal not displayed */ From string `json:"from" description:"time period to graph from specifies the beginning, ..."` Until string `json:"until" description:"... until specifies the end"` Format string `json:"format" description:"Controls the format of data returned Affects all targets passed in the URL."` JSONP string `json:"jsonp" description:"Wraps the response in a JSONP callback"` }
RenderQuery which is used by the /render path http://graphite-api.readthedocs.io/en/latest/api.html#the-render-api-render
type Ricksaw ¶
type Ricksaw struct { Target string `json:"target"` DataPoints []RicksawElement `json:"datapoints"` }
Ricksaw structure definition
type RicksawElement ¶
RicksawElement structure definition