telegraf/plugins
jaroug b2b361356e
Wildcard support for x509_cert files (#6952)
* Accept standard unix glob matching rules

* comply with indentation

* update readme

* move globing expand and url parsing into Init()

* chore: rebase branch on upstream master

* rename refreshFilePaths to expandFilePaths
* expandFilePaths handles '/path/to/*.pem' and 'files:///path/to/*.pem'
* update sample config

* fix: recompile files globing pattern at every gather tic

 * add var globFilePathsToUrls to stack files path
 * add var globpaths to stack compiled globpath
 * rework sourcesToURLs to compile files path and stack them
 * rename expandFilePaths to expandFilePathsToUrls
 * rework expandFilePathsToUrls to only match compiled globpath
 * rework the `Gather` ticker to match globpath at each call

* fix: comply with requested changes

 * add specifics regarding relative paths in sample config
 * add logger and use it in expandFilePathsToUrls()
 * precompile glob for `files://`, `/` and `://`

* fix: update README to match last changes

* fix: comply with last requested changes

 * rename expandFilePathsToUrls() to collectCertURLs()
 * collectCertURLs() now returns []*url.URL to avoid extra field
globFilePathsToUrls in structure
 * update the Gather() ticker accordingly

* fix(windows): do not try to compile glopath for windows path as it's not supposed to be supported by the OS

* fix(ci): apply go fmt

* fix(ci): empty-lines/import-shadowing

Co-authored-by: Anthony LE BERRE <aleberre@vente-privee.com>
2021-03-23 17:31:15 -04:00
..
aggregators Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984) 2021-03-22 12:21:36 -05:00
common Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984) 2021-03-22 12:21:36 -05:00
inputs Wildcard support for x509_cert files (#6952) 2021-03-23 17:31:15 -04:00
outputs Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984) 2021-03-22 12:21:36 -05:00
parsers Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984) 2021-03-22 12:21:36 -05:00
processors Add support of the time module in Starlark Processor (#9004) 2021-03-23 13:45:29 -04:00
serializers Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984) 2021-03-22 12:21:36 -05:00