當前位置: 首頁>>代碼示例>>Golang>>正文


Golang message.NewInt64Field函數代碼示例

本文整理匯總了Golang中github.com/mozilla-services/heka/message.NewInt64Field函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewInt64Field函數的具體用法?Golang NewInt64Field怎麽用?Golang NewInt64Field使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewInt64Field函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: ReportMsg

func (input *S3OffsetInput) ReportMsg(msg *message.Message) error {
	message.NewInt64Field(msg, "ProcessMessageCount", atomic.LoadInt64(&input.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures", atomic.LoadInt64(&input.processMessageFailures), "count")
	message.NewInt64Field(msg, "ProcessMessageBytes", atomic.LoadInt64(&input.processMessageBytes), "B")

	return nil
}
開發者ID:bsmedberg,項目名稱:data-pipeline,代碼行數:7,代碼來源:s3offset_input.go

示例2: ReportMsg

func (k *KafkaInput) ReportMsg(msg *message.Message) error {
	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&k.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures",
		atomic.LoadInt64(&k.processMessageFailures), "count")
	return nil
}
開發者ID:intoximeters,項目名稱:heka,代碼行數:7,代碼來源:kafka_input.go

示例3: ReportMsg

// Satisfies the `pipeline.ReportingPlugin` interface to provide plugin state
// information to the Heka report and dashboard.
func (t *TcpOutput) ReportMsg(msg *message.Message) error {
	t.reportLock.Lock()
	defer t.reportLock.Unlock()

	message.NewInt64Field(msg, "ProcessMessageCount", atomic.LoadInt64(&t.processMessageCount), "count")
	message.NewInt64Field(msg, "SentMessageCount", atomic.LoadInt64(&t.sentMessageCount), "count")
	return nil
}
開發者ID:Jimdo,項目名稱:heka,代碼行數:10,代碼來源:tcp_output.go

示例4: ReportMsg

func (r *RedisListOutput) ReportMsg(msg *message.Message) error {
	message.NewInt64Field(msg, "EncodingErrors",
		atomic.LoadInt64(&r.encodingErrors), "count")
	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&r.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures",
		atomic.LoadInt64(&r.processMessageFailures), "count")
	return nil
}
開發者ID:intoximeters,項目名稱:heka-redislist,代碼行數:9,代碼來源:redislist_output.go

示例5: ReportMsg

// Satisfies the `pipeline.ReportingPlugin` interface to provide plugin state
// information to the Heka report and dashboard.
func (o *ElasticSearchOutput) ReportMsg(msg *message.Message) error {
	o.reportLock.Lock()
	defer o.reportLock.Unlock()

	message.NewInt64Field(msg, "SentMessageCount",
		atomic.LoadInt64(&o.sentMessageCount), "count")
	message.NewInt64Field(msg, "DropMessageCount",
		atomic.LoadInt64(&o.dropMessageCount), "count")
	return nil
}
開發者ID:Nitro,項目名稱:heka,代碼行數:12,代碼來源:elasticsearch.go

示例6: ReportMsg

func (r *RedisListInput) ReportMsg(msg *message.Message) error {
	message.NewInt64Field(msg, "RedisPollCount",
		atomic.LoadInt64(&r.redisPollCount), "count")
	message.NewInt64Field(msg, "RedisPollFailures",
		atomic.LoadInt64(&r.redisPollFailures), "count")
	message.NewInt64Field(msg, "RedisPingFailures",
		atomic.LoadInt64(&r.redisPingFailures), "count")
	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&r.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures",
		atomic.LoadInt64(&r.processMessageFailures), "count")
	return nil
}
開發者ID:intoximeters,項目名稱:heka-redislist,代碼行數:13,代碼來源:redislist_input.go

示例7: ReportMsg

func (k *KafkaOutput) ReportMsg(msg *message.Message) error {
	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&k.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures",
		atomic.LoadInt64(&k.processMessageFailures), "count")
	message.NewInt64Field(msg, "ProcessMessageDiscards",
		atomic.LoadInt64(&k.processMessageDiscards), "count")
	message.NewInt64Field(msg, "KafkaDroppedMessages",
		atomic.LoadInt64(&k.kafkaDroppedMessages), "count")
	message.NewInt64Field(msg, "KafkaEncodingErrors",
		atomic.LoadInt64(&k.kafkaEncodingErrors), "count")
	return nil
}
開發者ID:Nitro,項目名稱:heka,代碼行數:13,代碼來源:kafka_output.go

示例8: ReportMsg

// Satisfies the `pipeline.ReportingPlugin` interface to provide plugin state
// information to the Heka report and dashboard.
func (o *ElasticSearchOutput) ReportMsg(msg *message.Message) error {
	o.reportLock.Lock()
	defer o.reportLock.Unlock()

	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&o.processMessageCount), "count")
	message.NewInt64Field(msg, "DropMessageCount",
		atomic.LoadInt64(&o.dropMessageCount), "count")

	if o.conf.UseBuffering {
		o.bufferedOut.ReportMsg(msg)
	}
	return nil
}
開發者ID:orangemi,項目名稱:heka,代碼行數:16,代碼來源:elasticsearch.go

示例9: ReportMsg

func (o *FlumeOutput) ReportMsg(msg *message.Message) error {
	o.reportLock.Lock()
	defer o.reportLock.Unlock()

	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&o.processMessageCount), "count")
	message.NewInt64Field(msg, "DropMessageCount",
		atomic.LoadInt64(&o.dropMessageCount), "count")
	message.NewInt64Field(msg, "BackMessageCount",
		atomic.LoadInt64(&o.backMessageCount), "count")
	o.bufferedOut.ReportMsg(msg)

	return nil
}
開發者ID:chentao,項目名稱:heka-flume,代碼行數:14,代碼來源:output.go

示例10: ReportMsg

// Adds running filters count to the report output.
func (this *SandboxManagerFilter) ReportMsg(msg *message.Message) error {
	message.NewIntField(msg, "RunningFilters", int(atomic.LoadInt32(&this.currentFilters)),
		"count")
	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&this.processMessageCount), "count")
	return nil
}
開發者ID:orangemi,項目名稱:heka,代碼行數:8,代碼來源:sandbox_manager_filter.go

示例11: ReportMsg

func (p *ProtobufDecoder) ReportMsg(msg *message.Message) error {
	p.reportLock.Lock()
	defer p.reportLock.Unlock()

	message.NewInt64Field(msg, "ProcessMessageCount", atomic.LoadInt64(&p.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures", atomic.LoadInt64(&p.processMessageFailures), "count")
	message.NewInt64Field(msg, "ProcessMessageSamples", p.processMessageSamples, "count")

	var tmp int64 = 0
	if p.processMessageSamples > 0 {
		tmp = p.processMessageDuration / p.processMessageSamples
	}
	message.NewInt64Field(msg, "ProcessMessageAvgDuration", tmp, "ns")

	return nil
}
開發者ID:Jimdo,項目名稱:heka,代碼行數:16,代碼來源:protobuf_decoder.go

示例12: ReportMsg

func (o *S3SplitFileOutput) ReportMsg(msg *message.Message) error {
	// If the OpenFileCount is consistently at or near OpenFileLimit, consider
	// increasing the max_open_files parameter.
	message.NewInt64Field(msg, "OpenFileCount", int64(o.fopenCache.Len()), "count")
	message.NewInt64Field(msg, "OpenFileLimit", int64(o.MaxOpenFiles), "count")
	message.NewInt64Field(msg, "ProcessFileCount", atomic.LoadInt64(&o.processFileCount), "count")
	message.NewInt64Field(msg, "ProcessFileFailures", atomic.LoadInt64(&o.processFileFailures), "count")
	message.NewInt64Field(msg, "ProcessFilePartialFailures", atomic.LoadInt64(&o.processFilePartialFailures), "count")
	message.NewInt64Field(msg, "ProcessFileBytes", atomic.LoadInt64(&o.processFileBytes), "B")
	message.NewInt64Field(msg, "ProcessMessageCount", atomic.LoadInt64(&o.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures", atomic.LoadInt64(&o.processMessageFailures), "count")
	message.NewInt64Field(msg, "ProcessMessageBytes", atomic.LoadInt64(&o.processMessageBytes), "B")
	message.NewInt64Field(msg, "EncodeMessageFailures", atomic.LoadInt64(&o.encodeMessageFailures), "count")

	return nil
}
開發者ID:bsmedberg,項目名稱:data-pipeline,代碼行數:16,代碼來源:s3splitfile_output.go

示例13: PopulateReportMsg

// Given a PluginRunner and a Message struct, this function will populate the
// Message struct's field values with the plugin's input channel length and
// capacity, plus any additional data that the plugin might provide through
// implementation of the `ReportingPlugin` interface defined above.
func PopulateReportMsg(pr PluginRunner, msg *message.Message) (err error) {
	if reporter, ok := pr.Plugin().(ReportingPlugin); ok {
		if err = reporter.ReportMsg(msg); err != nil {
			return
		}
	}

	if fRunner, ok := pr.(FilterRunner); ok {
		message.NewIntField(msg, "InChanCapacity", cap(fRunner.InChan()), "count")
		message.NewIntField(msg, "InChanLength", len(fRunner.InChan()), "count")
		message.NewIntField(msg, "MatchChanCapacity", cap(fRunner.MatchRunner().inChan), "count")
		message.NewIntField(msg, "MatchChanLength", len(fRunner.MatchRunner().inChan), "count")
		message.NewIntField(msg, "LeakCount", fRunner.LeakCount(), "count")
		var tmp int64 = 0
		fRunner.MatchRunner().reportLock.Lock()
		if fRunner.MatchRunner().matchSamples > 0 {
			tmp = fRunner.MatchRunner().matchDuration / fRunner.MatchRunner().matchSamples
		}
		fRunner.MatchRunner().reportLock.Unlock()
		message.NewInt64Field(msg, "MatchAvgDuration", tmp, "ns")
	} else if dRunner, ok := pr.(DecoderRunner); ok {
		message.NewIntField(msg, "InChanCapacity", cap(dRunner.InChan()), "count")
		message.NewIntField(msg, "InChanLength", len(dRunner.InChan()), "count")
	}
	msg.SetType("heka.plugin-report")
	return
}
開發者ID:Russell-IO,項目名稱:heka,代碼行數:31,代碼來源:report.go

示例14: ReportMsg

func (re *RiemannEncoder) ReportMsg(msg *message.Message) error {
	re.reportLock.Lock()
	defer re.reportLock.Unlock()

	message.NewInt64Field(msg, "ProcessMessageCount",
		atomic.LoadInt64(&re.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures",
		atomic.LoadInt64(&re.processMessageFailures), "count")
	message.NewInt64Field(msg, "ProcessMessageSamples",
		re.processMessageSamples, "count")

	var tmp int64 = 0
	if re.processMessageSamples > 0 {
		tmp = re.processMessageDuration / re.processMessageSamples
	}
	message.NewInt64Field(msg, "ProcessMessageAvgDuration", tmp, "ns")

	return nil
}
開發者ID:cspenceiv,項目名稱:heka-riemann-encoder,代碼行數:19,代碼來源:riemann_encoder.go

示例15: ReportMsg

// Satisfies the `pipeline.ReportingPlugin` interface to provide sandbox state
// information to the Heka report and dashboard.
func (s *SandboxInput) ReportMsg(msg *message.Message) error {
	s.reportLock.Lock()
	defer s.reportLock.Unlock()

	if s.sb == nil {
		return fmt.Errorf("Input is not running")
	}

	message.NewIntField(msg, "Memory", int(s.sb.Usage(TYPE_MEMORY,
		STAT_CURRENT)), "B")
	message.NewIntField(msg, "MaxMemory", int(s.sb.Usage(TYPE_MEMORY,
		STAT_MAXIMUM)), "B")
	message.NewIntField(msg, "MaxInstructions", int(s.sb.Usage(
		TYPE_INSTRUCTIONS, STAT_MAXIMUM)), "count")
	message.NewIntField(msg, "MaxOutput", int(s.sb.Usage(TYPE_OUTPUT,
		STAT_MAXIMUM)), "B")

	message.NewInt64Field(msg, "ProcessMessageCount", atomic.LoadInt64(&s.processMessageCount), "count")
	message.NewInt64Field(msg, "ProcessMessageFailures", atomic.LoadInt64(&s.processMessageFailures), "count")
	message.NewInt64Field(msg, "ProcessMessageBytes", atomic.LoadInt64(&s.processMessageBytes), "B")

	return nil
}
開發者ID:orangemi,項目名稱:heka,代碼行數:25,代碼來源:sandbox_input.go


注:本文中的github.com/mozilla-services/heka/message.NewInt64Field函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。