Documentation
¶
Index ¶
- func NewTestBackendConfigServer(transformations map[string]string) *kithttptest.Server
- func WithConfigBackendURL(url string) 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 NewTestBackendConfigServer ¶ added in v0.22.0
func NewTestBackendConfigServer(transformations map[string]string) *kithttptest.Server
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 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; }`, })
Types ¶
Click to show internal directories.
Click to hide internal directories.