Documentation ¶
Overview ¶
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent interface {
GetContext() agent.AgentContext
}
type EmitFormatter ¶
type EmitFormatter interface { // Format will receive all Emitter information to prepare the output as a string. Format(definition integration.Definition, ExtraLabels data.Map, entityRewrite []data.EntityRewrite, integrationJSON []byte) (string, error) }
EmitFormatter interface is used to implement different types of formats for a PrintEmitter.
func NewSimpleFormat ¶
func NewSimpleFormat() EmitFormatter
NewSimpleFormat instantiate a new SimpleFormat.
type Emitter ¶
type Emitter interface {
Emit(definition integration.Definition, ExtraLabels data.Map, entityRewrite []data.EntityRewrite, integrationJSON []byte) error
}
Emitter forwards agent/integration payload to parser & processors (entity ID decoration...)
func NewIntegrationEmittor ¶
func NewPrintEmitter ¶
func NewPrintEmitter(w io.Writer, fmt EmitFormatter) Emitter
NewPrintEmitter instantiate a new PrintEmitter.
func NewStdoutEmitter ¶
func NewStdoutEmitter() Emitter
NewStdoutEmitter instantiate a PrintEmitter that is configured to output to stdout using a SimpleFormat.
type PrintEmitter ¶
type PrintEmitter struct {
// contains filtered or unexported fields
}
PrintEmitter implements emitter.Emitter interface to format the integration payload using an EmitFormatter and output the result to a io.Writer implementation.
func (*PrintEmitter) Emit ¶
func (s *PrintEmitter) Emit( definition integration.Definition, ExtraLabels data.Map, entityRewrite []data.EntityRewrite, integrationJSON []byte, ) error
type VersionAwareEmitter ¶
type VersionAwareEmitter struct {
// contains filtered or unexported fields
}
VersionAwareEmitter actual Emitter for all integration protocol versions.
func (*VersionAwareEmitter) Emit ¶
func (e *VersionAwareEmitter) Emit(definition integration.Definition, extraLabels data.Map, entityRewrite []data.EntityRewrite, integrationJSON []byte) error