Add table filtering to avrorouter

The filtering is implemented with PCRE2 regular expressions and as such is
not the most user-friendly interface.
This commit is contained in:
Markus Mäkelä
2018-08-31 13:48:55 +03:00
parent 79ba89fba1
commit d7dd636c9a
4 changed files with 73 additions and 4 deletions

View File

@ -303,6 +303,12 @@ typedef struct avro_instance
* a flush of all tables */
uint64_t block_size; /**< Avro datablock size */
enum mxs_avro_codec_type codec; /**< Avro codec type, defaults to `null` */
/** Match and exclude patterns for tables */
pcre2_code* match;
pcre2_code* exclude;
pcre2_match_data* md_match;
pcre2_match_data* md_exclude;
struct avro_instance *next;
} AVRO_INSTANCE;
@ -355,6 +361,8 @@ extern void avro_flush_all_tables(AVRO_INSTANCE *router, enum avrorouter_file_op
#define AVRO_CS_BUSY 0x0001
#define AVRO_WAIT_DATA 0x0002
bool table_matches(AVRO_INSTANCE* inst, const char* ident);
MXS_END_DECLS
#endif