Documentation ¶
Index ¶
- Variables
- func ConvertToTStData(src APIResponse, key Keys, ref string) ([]*models.DataResp, error)
- type APIResponse
- type Column
- type Keys
- type TdengineClientMap
- func (pc *TdengineClientMap) Del(datasourceId int64)
- func (pc *TdengineClientMap) GetCli(datasourceId int64) *tdengineClient
- func (pc *TdengineClientMap) GetDatasourceIds() []int64
- func (pc *TdengineClientMap) Hit(datasourceIds []int64) []int64
- func (pc *TdengineClientMap) InitReader() error
- func (pc *TdengineClientMap) IsNil(datasourceId int64) bool
- func (pc *TdengineClientMap) Reset()
- func (pc *TdengineClientMap) Set(datasourceId int64, r *tdengineClient)
- type TdengineOption
- type TdengineOptionsStruct
- type TdengineQuery
Constants ¶
This section is empty.
Variables ¶
View Source
var TdengineOptions = &TdengineOptionsStruct{Data: make(map[int64]TdengineOption)}
Data key is cluster name
Functions ¶
func ConvertToTStData ¶
Types ¶
type APIResponse ¶
type APIResponse struct { Code int `json:"code"` ColumnMeta [][]interface{} `json:"column_meta"` Data [][]interface{} `json:"data"` Rows int `json:"rows"` }
func TimeFormat ¶
func TimeFormat(src APIResponse, timeFormat string) APIResponse
type TdengineClientMap ¶
type TdengineClientMap struct { sync.RWMutex ReaderClients map[int64]*tdengineClient // contains filtered or unexported fields }
func NewTdengineClient ¶
func NewTdengineClient(ctx *ctx.Context, heartbeat aconf.HeartbeatConfig) *TdengineClientMap
func (*TdengineClientMap) Del ¶
func (pc *TdengineClientMap) Del(datasourceId int64)
func (*TdengineClientMap) GetCli ¶
func (pc *TdengineClientMap) GetCli(datasourceId int64) *tdengineClient
func (*TdengineClientMap) GetDatasourceIds ¶
func (pc *TdengineClientMap) GetDatasourceIds() []int64
func (*TdengineClientMap) Hit ¶
func (pc *TdengineClientMap) Hit(datasourceIds []int64) []int64
Hit 根据当前有效的 datasourceId 和规则的 datasourceId 配置计算有效的cluster列表
func (*TdengineClientMap) InitReader ¶
func (pc *TdengineClientMap) InitReader() error
func (*TdengineClientMap) IsNil ¶
func (pc *TdengineClientMap) IsNil(datasourceId int64) bool
func (*TdengineClientMap) Reset ¶
func (pc *TdengineClientMap) Reset()
func (*TdengineClientMap) Set ¶
func (pc *TdengineClientMap) Set(datasourceId int64, r *tdengineClient)
type TdengineOption ¶
type TdengineOption struct { DatasourceName string Url string BasicAuthUser string BasicAuthPass string Token string Timeout int64 DialTimeout int64 MaxIdleConnsPerHost int Headers []string tlsx.ClientConfig }
func (*TdengineOption) Equal ¶
func (po *TdengineOption) Equal(target TdengineOption) bool
type TdengineOptionsStruct ¶
type TdengineOptionsStruct struct { Data map[int64]TdengineOption sync.RWMutex }
func (*TdengineOptionsStruct) Del ¶
func (pos *TdengineOptionsStruct) Del(datasourceId int64)
func (*TdengineOptionsStruct) Get ¶
func (pos *TdengineOptionsStruct) Get(datasourceId int64) (TdengineOption, bool)
func (*TdengineOptionsStruct) Set ¶
func (pos *TdengineOptionsStruct) Set(datasourceId int64, po TdengineOption)
Click to show internal directories.
Click to hide internal directories.