Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_kafka.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <libgen.h>
#include <errno.h>
#include "nilorea/n_log.h"
#include "nilorea/n_network.h"
#include "nilorea/n_kafka.h"
#include "cJSON.h"
#include "rdkafka.h"
+ Include dependency graph for ex_kafka.c:

Go to the source code of this file.

Macros

#define ERROR   -1
 
#define NB_TEST_EVENTS   10
 
#define OK   0
 

Functions

int main (int argc, char *argv[])
 
static void stop (int sig)
 
void usage (void)
 

Variables

char * config_file = NULL
 
char * event_file = NULL
 
char * event_log_file = NULL
 
char * event_string = NULL
 
int getoptret = 0
 
int KAFKA_MODE = -1
 
int log_level = 3
 
char * log_prefix = NULL
 
int PRODUCER_MODE = 0
 
int run = 1
 

Macro Definition Documentation

◆ ERROR

#define ERROR   -1

Definition at line 42 of file ex_kafka.c.

◆ NB_TEST_EVENTS

#define NB_TEST_EVENTS   10

Definition at line 43 of file ex_kafka.c.

◆ OK

#define OK   0

Definition at line 41 of file ex_kafka.c.

Function Documentation

◆ main()

◆ stop()

static void stop ( int  sig)
static
Examples
ex_kafka.c.

Definition at line 74 of file ex_kafka.c.

References run.

Referenced by main().

+ Here is the caller graph for this function:

◆ usage()

void usage ( void  )

Definition at line 58 of file ex_kafka.c.

Variable Documentation

◆ config_file

char* config_file = NULL
Examples
ex_kafka.c.

Definition at line 45 of file ex_kafka.c.

Referenced by main(), and n_kafka_load_config().

◆ event_file

char * event_file = NULL
Examples
ex_kafka.c.

Definition at line 47 of file ex_kafka.c.

Referenced by main().

◆ event_log_file

char * event_log_file = NULL
Examples
ex_kafka.c.

Definition at line 48 of file ex_kafka.c.

Referenced by main().

◆ event_string

char * event_string = NULL
Examples
ex_kafka.c.

Definition at line 46 of file ex_kafka.c.

Referenced by main(), and n_kafka_produce_ex().

◆ getoptret

int getoptret = 0

Definition at line 52 of file ex_kafka.c.

◆ KAFKA_MODE

int KAFKA_MODE = -1
Examples
ex_kafka.c.

Definition at line 53 of file ex_kafka.c.

Referenced by main().

◆ log_level

int log_level = 3

Definition at line 51 of file ex_kafka.c.

◆ log_prefix

char * log_prefix = NULL
Examples
ex_kafka.c.

Definition at line 49 of file ex_kafka.c.

Referenced by main().

◆ PRODUCER_MODE

int PRODUCER_MODE = 0
Examples
ex_kafka.c.

Definition at line 54 of file ex_kafka.c.

◆ run

int run = 1
Examples
ex_kafka.c.

Definition at line 55 of file ex_kafka.c.

Referenced by main(), and stop().