Documentation ¶
Index ¶
- func NewTransformerBackendConfigHandler(transformations map[string]string) http.Handler
- type Option
- func WithConfigBackendURL(url string) Option
- func WithConnectionToHostEnabled() Option
- func WithDockerImageTag(tag string) Option
- func WithDockerNetwork(network *docker.Network) Option
- func WithEnv(env string) Option
- func WithRepository(repository string) Option
- func WithUserTransformations(transformations map[string]string, cleaner resource.Cleaner) Option
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶ added in v0.44.0
type Option func(*config)
func WithConfigBackendURL ¶
WithConfigBackendURL lets transformer use custom backend config server for transformations WithConfigBackendURL should not be used with WithUserTransformations option
func WithConnectionToHostEnabled ¶ added in v0.23.2
func WithConnectionToHostEnabled() Option
WithConnectionToHostEnabled lets transformer container connect with the host machine i.e. transformer container will be able to access localhost of the host machine
func WithDockerImageTag ¶
func WithDockerNetwork ¶ added in v0.43.0
func WithRepository ¶ added in v0.44.0
func WithUserTransformations ¶ added in v0.22.0
WithUserTransformations will mock BE config to set transformation for given transformation versionID to transformation function map
- events with transformationVersionID not present in map will not be transformed and transformer will return 404 for those requests
- WithUserTransformations should not be used with WithConfigBackendURL option
- only javascript transformation functions are supported
e.g.
WithUserTransformations(map[string]string{ "transform-version-id-1": `export function transformEvent(event, metadata) { event.transformed=true return event; }`, })