Search in sources :

Example 11 with Function

use of org.graylog.plugins.pipelineprocessor.ast.functions.Function in project graylog2-server by Graylog2.

the class PrecedenceTest method registerFunctions.

@BeforeClass
public static void registerFunctions() {
    final Map<String, Function<?>> functions = commonFunctions();
    functions.put(StringConversion.NAME, new StringConversion());
    functionRegistry = new FunctionRegistry(functions);
}
Also used : Function(org.graylog.plugins.pipelineprocessor.ast.functions.Function) StringConversion(org.graylog.plugins.pipelineprocessor.functions.conversion.StringConversion) BeforeClass(org.junit.BeforeClass)

Example 12 with Function

use of org.graylog.plugins.pipelineprocessor.ast.functions.Function in project graylog2-server by Graylog2.

the class PipelineServiceHelperTest method setup.

@Before
public void setup() {
    final Map<String, Function<?>> functions = ImmutableMap.of();
    final PipelineRuleParser pipelineRuleParser = new PipelineRuleParser(new FunctionRegistry(functions));
    underTest = new PipelineServiceHelper(pipelineRuleParser);
}
Also used : Function(org.graylog.plugins.pipelineprocessor.ast.functions.Function) FunctionRegistry(org.graylog.plugins.pipelineprocessor.parser.FunctionRegistry) PipelineRuleParser(org.graylog.plugins.pipelineprocessor.parser.PipelineRuleParser) Before(org.junit.Before)

Aggregations

Function (org.graylog.plugins.pipelineprocessor.ast.functions.Function)12 CreateMessage (org.graylog.plugins.pipelineprocessor.functions.messages.CreateMessage)9 DropMessage (org.graylog.plugins.pipelineprocessor.functions.messages.DropMessage)9 SetField (org.graylog.plugins.pipelineprocessor.functions.messages.SetField)9 PipelineService (org.graylog.plugins.pipelineprocessor.db.PipelineService)8 RuleService (org.graylog.plugins.pipelineprocessor.db.RuleService)8 InMemoryPipelineService (org.graylog.plugins.pipelineprocessor.db.memory.InMemoryPipelineService)8 InMemoryRuleService (org.graylog.plugins.pipelineprocessor.db.memory.InMemoryRuleService)8 MongoDbPipelineService (org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbPipelineService)8 MongoDbRuleService (org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbRuleService)8 Message (org.graylog2.plugin.Message)8 Messages (org.graylog2.plugin.Messages)8 Test (org.junit.Test)8 StringConversion (org.graylog.plugins.pipelineprocessor.functions.conversion.StringConversion)4 BeforeClass (org.junit.BeforeClass)3 LongConversion (org.graylog.plugins.pipelineprocessor.functions.conversion.LongConversion)2 Now (org.graylog.plugins.pipelineprocessor.functions.dates.Now)2 Days (org.graylog.plugins.pipelineprocessor.functions.dates.periods.Days)2 Hours (org.graylog.plugins.pipelineprocessor.functions.dates.periods.Hours)2 Millis (org.graylog.plugins.pipelineprocessor.functions.dates.periods.Millis)2