Documentation
¶
Index ¶
- func AutoRender(w http.ResponseWriter, data interface{}, err error)
- func GrafanaApiParser(w http.ResponseWriter, req *http.Request)
- func ParseDuration(param string) (start, end int64)
- func RenderDataJson(w http.ResponseWriter, data interface{})
- func RenderJson(w http.ResponseWriter, v interface{})
- func RenderMsgJson(w http.ResponseWriter, msg string)
- func Start()
- func StdRender(w http.ResponseWriter, data interface{}, err error)
- type City
- type Dto
- type EChartsData
- type GraphAliveParam
- type GraphAliveResponse
- type GraphHistoryParam
- type Idc
- type Province
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoRender ¶
func AutoRender(w http.ResponseWriter, data interface{}, err error)
func GrafanaApiParser ¶
func GrafanaApiParser(w http.ResponseWriter, req *http.Request)
func ParseDuration ¶
func RenderDataJson ¶
func RenderDataJson(w http.ResponseWriter, data interface{})
func RenderJson ¶
func RenderJson(w http.ResponseWriter, v interface{})
func RenderMsgJson ¶
func RenderMsgJson(w http.ResponseWriter, msg string)
func StdRender ¶
func StdRender(w http.ResponseWriter, data interface{}, err error)
Types ¶
type EChartsData ¶
type EChartsData struct { Timestamp []interface{} `json:"timestamp"` Data map[string]([]interface{}) `json:"data"` }
func (*EChartsData) GetEchartsData ¶
func (this *EChartsData) GetEchartsData(datas []*cmodel.GraphQueryResponse)
如果请求的不同counter的采集周期不一致,或者不同的采集频率,可能出现不准确
type GraphAliveParam ¶
type GraphAliveParam struct {
Endpoint string `json:"endpoint"`
}
type GraphAliveResponse ¶
type GraphHistoryParam ¶
type GraphHistoryParam struct { Start int `json:"start"` End int `json:"end"` CF string `json:"cf"` EndpointCounters []cmodel.GraphInfoParam `json:"endpoint_counters"` }
Click to show internal directories.
Click to hide internal directories.