transformer

package
v1.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PIIEngine

func PIIEngine() *pii.Engine

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 NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new Transformer Registry.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL