Documentation ¶
Index ¶
- func NewTransformerBackendConfigHandler(transformations map[string]string) http.Handler
- func WithConfigBackendURL(url string) func(*config)
- func WithConnectionToHostEnabled() func(*config)
- func WithDockerImageTag(tag string) func(*config)
- func WithUserTransformations(transformations map[string]string, cleaner resource.Cleaner) func(*config)
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransformerBackendConfigHandler ¶ added in v0.23.2
NewTransformerBackendConfigHandler returns http request handler to handle all backend config requests by transformer
func WithConfigBackendURL ¶
func WithConfigBackendURL(url string) func(*config)
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() func(*config)
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 WithDockerImageTag(tag string) func(*config)
func WithUserTransformations ¶ added in v0.22.0
func WithUserTransformations(transformations map[string]string, cleaner resource.Cleaner) func(*config)
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; }`, })