Documentation ¶
Index ¶
- Constants
- func IsKnownTransformerType(t abstract.TransformerType) bool
- func KnownTransformerNames() []string
- func New(typ abstract.TransformerType, cfg Config, lgr log.Logger, ...) (abstract.Transformer, error)
- func Register[TConfig Config](typ abstract.TransformerType, ...)
- func Sinker(config *Transformers, runtime abstract.TransformationRuntimeOpts, ...) abstract.SinkOption
- type Config
- type ErrorsOutput
- type OutputType
- type Transformer
- type TransformerFactory
- type Transformers
- type WithID
Constants ¶
View Source
const ( SinkErrorsOutput = OutputType("sink") DevnullErrorsOutput = OutputType("devnull") )
View Source
const ID = "transformerId"
Variables ¶
This section is empty.
Functions ¶
func IsKnownTransformerType ¶
func IsKnownTransformerType(t abstract.TransformerType) bool
func KnownTransformerNames ¶
func KnownTransformerNames() []string
func New ¶
func New(typ abstract.TransformerType, cfg Config, lgr log.Logger, rt abstract.TransformationRuntimeOpts) (abstract.Transformer, error)
func Register ¶
func Register[TConfig Config](typ abstract.TransformerType, f func(cfg TConfig, lgr log.Logger, runtime abstract.TransformationRuntimeOpts) (abstract.Transformer, error))
func Sinker ¶
func Sinker( config *Transformers, runtime abstract.TransformationRuntimeOpts, transformers []abstract.Transformer, lgr log.Logger, registry metrics.Registry, ) abstract.SinkOption
Types ¶
type ErrorsOutput ¶
type ErrorsOutput struct { Type OutputType Config any }
type OutputType ¶
type OutputType string
type Transformer ¶
type Transformer map[abstract.TransformerType]interface{}
Transformer serializeable one-of wrapper, for backward compatibility will hold both type discriminator and config value itself, config is just an any object on later stages it materializes as real config object, specific to transformer
func (Transformer) Config ¶
func (t Transformer) Config() Config
func (Transformer) ID ¶
func (t Transformer) ID() string
func (Transformer) Type ¶
func (t Transformer) Type() abstract.TransformerType
type TransformerFactory ¶
type TransformerFactory func(protoConfig any, lgr log.Logger, runtime abstract.TransformationRuntimeOpts) (abstract.Transformer, error)
type Transformers ¶
type Transformers struct { DebugMode bool `json:"debugMode"` Transformers []Transformer `json:"transformers"` ErrorsOutput *ErrorsOutput `json:"errorsOutput"` }
Click to show internal directories.
Click to hide internal directories.