本文整理匯總了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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}