Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, t Transformer)
Register adds a transformer to the default registry.
Types ¶
type PreparedTransformer ¶
type PreparedTransformer interface {
Transformer
Prepare(config map[string]any) (map[string]any, error)
}
PreparedTransformer allows pre-parsing configuration for better performance.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages the available transformers.
func (*Registry) Get ¶
func (r *Registry) Get(name string) (Transformer, bool)
Get retrieves a transformer by name.
func (*Registry) Register ¶
func (r *Registry) Register(name string, t Transformer)
Register adds a transformer to the registry.
type Transformer ¶
type Transformer interface {
Transform(ctx context.Context, msg hermod.Message, config map[string]any) (hermod.Message, error)
}
Transformer defines the interface for data transformations.
func Get ¶
func Get(name string) (Transformer, bool)
Get retrieves a transformer from the default registry.
Click to show internal directories.
Click to hide internal directories.