luasandbox  1.4.0
Generic Lua sandbox for dynamic data analysis
heka_message_matcher.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 /** Hindsight/Heka message matcher @file */
8 
9 #ifndef luasandbox_util_heka_message_matcher_h_
10 #define luasandbox_util_heka_message_matcher_h_
11 
12 #include <stdbool.h>
13 
14 #include "heka_message.h"
15 
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 /**
24  * Parses a message matcher expression and returns the matcher
25  *
26  * @param exp Expression to parse into a matcher
27  *
28  * @return lsb_message_matcher*
29  */
31 lsb_create_message_matcher(const char *exp);
32 
33 /**
34  * Frees all memory associated with a message matcher instance
35  *
36  * @param mm Message matcher
37  */
39 
40 /**
41  * Evaluates the message matcher against the provided message
42  *
43  * @param mm Message matcher
44  * @param m Heka message
45  *
46  * @return bool True if the message is a match
47  */
48 LSB_UTIL_EXPORT bool
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif
struct lsb_message_matcher lsb_message_matcher
Heka message representation.
LSB_UTIL_EXPORT bool lsb_eval_message_matcher(lsb_message_matcher *mm, lsb_heka_message *m)
Evaluates the message matcher against the provided message.
#define LSB_UTIL_EXPORT
Definition: util.h:28
LSB_UTIL_EXPORT lsb_message_matcher * lsb_create_message_matcher(const char *exp)
Parses a message matcher expression and returns the matcher.
LSB_UTIL_EXPORT void lsb_destroy_message_matcher(lsb_message_matcher *mm)
Frees all memory associated with a message matcher instance.