google / nel-collector

Network Error Logging (NEL) collector
https://wicg.github.io/network-error-logging/
Apache License 2.0
38 stars 17 forks source link

Use configuration file to define report processors #21

Closed dcreager closed 6 years ago

dcreager commented 6 years ago

We're going to use TOML as the syntax. You'll add a top-level processor clause for each processor you want to instantiate. The type element determines which kind of processor to instantiate, and the processor's loader function can use any other elements to configure the new processor.

This patch also adds a new test helper function that instantiates the pipeline to be tested using a configuration string. Each of the per-processor test cases is now really clean and simple.