cache.go 408 字节
Newer Older
Y
yubo 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package cache

import (
	"context"

	"github.com/didi/nightingale/src/modules/prober/config"
)

var CollectRule *CollectRuleCache // collectrule.go
var MetricHistory *history        // history.go

func Init(ctx context.Context) error {
	CollectRule = NewCollectRuleCache(&config.Config.CollectRule)
	CollectRule.start(ctx)
	MetricHistory = NewHistory()
16
	config.InitPluginsConfig(config.Config)
Y
yubo 已提交
17 18
	return nil
}