Documentation ¶
Index ¶
- Variables
- func Counter2Metric(counter string) (string, map[string]string)
- func GetIndex()
- func GetIndexLoop()
- func Init(cfg SeriesQuerySection)
- func NewQueryRequest(nid, endpoint, metric string, tagsMap map[string]string, step int, ...) (*dataobj.QueryData, error)
- func Query(reqs []*dataobj.QueryData, stra *models.Stra, expFunc string) []*dataobj.TsdbQueryResponse
- func QueryFromMem(reqs []*dataobj.QueryData, stra *models.Stra) ([]*dataobj.TsdbQueryResponse, []*dataobj.QueryData)
- type IndexAddrs
- type IndexData
- type IndexReq
- type IndexResp
- type SeriesQuerySection
- type XCludeStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorIndexParamIllegal = errors.New("index param illegal") ErrorQueryParamIllegal = errors.New("query param illegal") )
Functions ¶
func GetIndexLoop ¶
func GetIndexLoop()
func Init ¶
func Init(cfg SeriesQuerySection)
func NewQueryRequest ¶
func Query ¶
func Query(reqs []*dataobj.QueryData, stra *models.Stra, expFunc string) []*dataobj.TsdbQueryResponse
执行Query操作 默认不重试, 如果要做重试, 在这里完成
func QueryFromMem ¶
Types ¶
type IndexAddrs ¶
var IndexList IndexAddrs
func (*IndexAddrs) Get ¶
func (i *IndexAddrs) Get() []string
func (*IndexAddrs) Set ¶
func (i *IndexAddrs) Set(addrs []string)
type IndexData ¶
type IndexReq ¶
type IndexReq struct { Nids []string `json:"nids"` Endpoints []string `json:"endpoints"` Metric string `json:"metric"` Include []XCludeStruct `json:"include,omitempty"` Exclude []XCludeStruct `json:"exclude,omitempty"` }
type SeriesQuerySection ¶
type SeriesQuerySection struct { MaxConn int `json:"maxConn"` // MaxIdle int `json:"maxIdle"` // ConnTimeout int `json:"connTimeout"` // 连接超时 CallTimeout int `json:"callTimeout"` // 请求超时 IndexMod string `json:"indexMod"` IndexPath string `json:"indexPath"` IndexCallTimeout int `json:"indexCallTimeout"` // 请求超时 }
var ( TransferConnPools *pools.ConnPools Config SeriesQuerySection )
type XCludeStruct ¶
******** 补全索引相关 ********
Click to show internal directories.
Click to hide internal directories.