trivago / gollum

An n:m message multiplexer written in Go
http://gollum.readthedocs.org/en/latest/
Apache License 2.0
940 stars 74 forks source link

extend format.MetadataCopy to allow more precise copies #218

Closed arnecls closed 6 years ago

arnecls commented 6 years ago

The purpose of this pull request

This extends the format.MetadataCopy filter to make it more useful. The version shipped with 0.5.0 supported only metadata keys as targets. The new version will allow copying payload / metadata from and to any destination inside the message. However, the support for multiple targets has been dropped as it can be achieved by adding multiple instances of the filter.

Config to verify

Append the value of a key to the payload

format.MetadataCopy:
  Key: foo
  Mode: append

Copy the payload to a key (replace existing data)

format.MetadataCopy:
  ApplyTo: key

Checklist

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling af8c9ca6d99921b13d3143a1d73afdad764c662f on format_metadatacopy into on v0.5.x-dev.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling af8c9ca6d99921b13d3143a1d73afdad764c662f on format_metadatacopy into on v0.5.x-dev.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 4fe939af95e018f6b79921776753d0743730959f on format_metadatacopy into on v0.5.x-dev.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 4fe939af95e018f6b79921776753d0743730959f on format_metadatacopy into on v0.5.x-dev.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 4fe939af95e018f6b79921776753d0743730959f on format_metadatacopy into on v0.5.x-dev.