magnusbaeck / logstash-filter-verifier

Apache License 2.0
191 stars 27 forks source link

Make wait-for-late-arrivals-timeout configurable #171

Closed breml closed 2 years ago

breml commented 2 years ago

Fixes: #168

breml commented 2 years ago

@magnusbaeck Some of the "constructors" have really long argument lists by now, so this should be refactored. Maybe I find some time at the end of the month to have a look at this.

breml commented 2 years ago

I see two options to address the long argument lists for the constructors:

  1. Config struct
  2. Functional options

(see: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis)

I personally like the functional options approach very much.

magnusbaeck commented 2 years ago

Ah yes, functional options are quite nice. Incidentally I implemented them in https://github.com/eiffel-community/eiffelevents-sdk-go/pull/16 just a few days ago.