当前位置: 首页>>代码示例>>Golang>>正文


Golang Context.Inflight方法代码示例

本文整理汇总了Golang中github.com/funkygao/gafka/cmd/kguard/monitor.Context.Inflight方法的典型用法代码示例。如果您正苦于以下问题:Golang Context.Inflight方法的具体用法?Golang Context.Inflight怎么用?Golang Context.Inflight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/funkygao/gafka/cmd/kguard/monitor.Context的用法示例。


在下文中一共展示了Context.Inflight方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Init

func (this *WatchConsumers) Init(ctx monitor.Context) {
	this.Zkzone = ctx.ZkZone()
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()
	this.logFrequentConsumer = false
	this.offsetMtimeMap = make(map[structs.GroupTopicPartition]time.Time, 100)
}
开发者ID:funkygao,项目名称:gafka,代码行数:7,代码来源:consumer.go

示例2: Init

func (this *WatchActord) Init(ctx monitor.Context) {
	this.Zkzone = ctx.ZkZone()
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()

	b, err := this.Zkzone.KatewayJobClusterConfig()
	if err != nil {
		log.Error(err)
		return
	}
	var mcc = &config.ConfigMysql{}
	if err = mcc.From(b); err != nil {
		log.Error(err)
		return
	}

	this.mc = mysql.New(mcc)
	manager.Default = dummy.New("")
}
开发者ID:funkygao,项目名称:gafka,代码行数:19,代码来源:actord.go

示例3: Init

func (this *WatchQps) Init(ctx monitor.Context) {
	this.Zkzone = ctx.ZkZone()
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()

	conf := &anomalyzer.AnomalyzerConf{
		Sensitivity: 0.1,
		UpperBound:  5,
		LowerBound:  0,
		ActiveSize:  1,
		NSeasons:    4,
		Methods:     []string{"diff", "fence", "highrank", "lowrank", "magnitude"},
	}
	var err error
	this.anomaly, err = anomalyzer.NewAnomalyzer(conf, nil)
	if err != nil {
		panic(err)
	}
}
开发者ID:funkygao,项目名称:gafka,代码行数:19,代码来源:qps.go

示例4: Init

func (this *WatchExec) Init(ctx monitor.Context) {
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()
	this.confDir = ctx.ExternalDir()
}
开发者ID:funkygao,项目名称:gafka,代码行数:5,代码来源:exec.go

示例5: Init

func (this *WatchInfluxServer) Init(ctx monitor.Context) {
	this.Zkzone = ctx.ZkZone()
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()
	this.addr = ctx.InfluxAddr()
}
开发者ID:funkygao,项目名称:gafka,代码行数:6,代码来源:influxdb.go

示例6: Init

func (this *WatchRedisInfo) Init(ctx monitor.Context) {
	this.Zkzone = ctx.ZkZone()
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()
}
开发者ID:funkygao,项目名称:gafka,代码行数:5,代码来源:info.go

示例7: Init

func (this *WatchSub) Init(ctx monitor.Context) {
	this.Zkzone = ctx.ZkZone()
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()
	this.suspects = make(map[structs.GroupTopicPartition]subStatus)
}
开发者ID:funkygao,项目名称:gafka,代码行数:6,代码来源:sub.go

示例8: Init

func (this *WatchLoadAvg) Init(ctx monitor.Context) {
	this.Stop = ctx.StopChan()
	this.Wg = ctx.Inflight()
}
开发者ID:funkygao,项目名称:gafka,代码行数:4,代码来源:loadavg.go


注:本文中的github.com/funkygao/gafka/cmd/kguard/monitor.Context.Inflight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。