Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to chain Beat processors in the script processor #11680

Merged

Commits on Apr 9, 2019

  1. Make it possible to chain Beat processors in the script processor

    Prior to this change it was possible to construct individual Beat processors. This adds the ability
    to chain them together in a list so that calling a single `Run(event)` function executes the list of
    processors.
    
        var localeProcessor = new processor.AddLocale();
    
        var chain = new processor.Chain()
            .Add(localeProcessor)
            .Rename({
                fields: [
                    {from: "event.timezone", to: "timezone"},
                ],
            })
            .Add(function(evt) {
                evt.Put("hello", "world");
            })
            .Build();
    
        function process(evt) {
            return chain.Run(evt);
        }
    andrewkroh committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    a00f8e0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06cdb0b View commit details
    Browse the repository at this point in the history