Documentation ¶
Index ¶
- Constants
- Variables
- func AggAllEndMap()
- func AsyncPushKafka(polyType, polyName, endpoint, counter, method string, value float64)
- func CommonInitQueue(poly_type string) (map[string][]*model.PolyMetric, int)
- func CreatePloyQueueIfNeed(name string)
- func GeneralPolyMethods(Name string, Q *nlist.SafeListLimited)
- func InitGroupStrategy()
- func MultiRunWorker(gp *GeneralPoly)
- func PushToProme(metric, polyName string, dataMap map[string]float64)
- func RenewAmsTagStrategy()
- func RenewFalconGroupStrategy()
- func RpcCallNumpApi(metric, polyName string, endList []SingleEnd)
- func RunAllPoly()
- func RunFalconGroupSql(grpName string) (ends []string)
- func SyncGroupStrategyFromDb()
- func SyncStrategyToCache()
- type GeneralPoly
- type GroupRes
- type NumpReq
- type NumpReqNew
- type PolyTickerWorker
- type SingleEnd
Constants ¶
View Source
const ( PolyTimeStep = 30 CounterTimeStep = 30 CounterType = "COUNTER" GAUGEType = "GAUGE" PolyStringSep = "||" MultiPolySep = "@@" RedisLockTimeout = 55 MaxQueueSize = 400000 // 最多的为所有机器的点 不会超过40w RedisHMapTimeout = 60 * 60 RunPolyInterval = 60 PloyMetricStrategyLock = "ploy_metric_strategy_lock" EndPolyStrategyHashKey = "end_poly_strategy_hash_key" FalconGroupPolyType = "falcon_group" AmsTagPolyType = "ams_tag" )
View Source
const (
SEP = PolyStringSep
)
Variables ¶
View Source
var ( EndPolyMetricMap = sync.Map{} EndPolyAmsTagMetricMap = sync.Map{} EndPolyFalconGroupMetricMap = sync.Map{} PolyWorkerQueueMap = sync.Map{} PolyTypeMap = sync.Map{} PolyDbConfigMap = sync.Map{} PolyHistoryDataMap = sync.Map{} GroupPolyMethod = []string{"sum", "avg", "max", "min", "tp50", "tp90", "tp99"} )
Functions ¶
func AggAllEndMap ¶
func AggAllEndMap()
func AsyncPushKafka ¶
func CommonInitQueue ¶
func CommonInitQueue(poly_type string) (map[string][]*model.PolyMetric, int)
func CreatePloyQueueIfNeed ¶
func CreatePloyQueueIfNeed(name string)
func GeneralPolyMethods ¶
func GeneralPolyMethods(Name string, Q *nlist.SafeListLimited)
func InitGroupStrategy ¶
func InitGroupStrategy()
func MultiRunWorker ¶
func MultiRunWorker(gp *GeneralPoly)
func PushToProme ¶
func RenewFalconGroupStrategy ¶
func RenewFalconGroupStrategy()
func RpcCallNumpApi ¶
func RunAllPoly ¶
func RunAllPoly()
func RunFalconGroupSql ¶
func SyncGroupStrategyFromDb ¶
func SyncGroupStrategyFromDb()
func SyncStrategyToCache ¶
func SyncStrategyToCache()
Types ¶
type GeneralPoly ¶
type GeneralPoly struct { Result chan interface{} ArgMap map[string][]*model.PolyMetric MaxWorker int64 ActionFunc func(name string, strategys []*model.PolyMetric) Type string Num int }
func (*GeneralPoly) AmsTagHttpwork ¶
func (this *GeneralPoly) AmsTagHttpwork(name string, strategys []*model.PolyMetric)
func (*GeneralPoly) FalconGroupwork ¶
func (this *GeneralPoly) FalconGroupwork(name string, strategys []*model.PolyMetric)
func (*GeneralPoly) NewWorkPool ¶
func (this *GeneralPoly) NewWorkPool()
type NumpReqNew ¶
type PolyTickerWorker ¶
type PolyTickerWorker struct { Queue *nlist.SafeListLimited Name string Ticker *time.Ticker Quit chan struct{} Started bool Interval int }
func (*PolyTickerWorker) Start ¶
func (this *PolyTickerWorker) Start()
func (*PolyTickerWorker) WorkerRun ¶
func (this *PolyTickerWorker) WorkerRun()
Click to show internal directories.
Click to hide internal directories.