diff --git a/inc/tsg_rule.h b/inc/tsg_rule.h index 7f2ff3f..ffd5682 100644 --- a/inc/tsg_rule.h +++ b/inc/tsg_rule.h @@ -2,7 +2,6 @@ #define __TSG_RULE_H__ #include -#include "tsg_types.h" #ifdef __cplusplus extern "C" diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp index c6f210b..d163bde 100644 --- a/src/tsg_send_log.cpp +++ b/src/tsg_send_log.cpp @@ -15,7 +15,6 @@ #include #include -#include "tsg_types.h" #include "tsg_send_log.h" #include "tsg_send_log_internal.h" diff --git a/src/tsg_send_log_internal.h b/src/tsg_send_log_internal.h index 7162b42..b041aa2 100644 --- a/src/tsg_send_log_internal.h +++ b/src/tsg_send_log_internal.h @@ -4,9 +4,6 @@ #include #include -#include "tsg_types.h" - - #define MAX_IPV4_LEN 16 #define MAX_STRING_LEN 32 @@ -23,32 +20,6 @@ enum _DO_LOG LOG_ALL=2 }; -typedef struct _id2field -{ - TLD_TYPE type; - int id; - char name[MAX_STRING_LEN]; -}id2field_t; - -struct _tld_handle -{ - int thread_id; - cJSON *object; -}; - -struct _tsg_log_instance -{ - int mode; - int max_service; - void *logger; - char common_field_file[MAX_STRING_LEN*4]; - char broker_list[MAX_STRING_LEN*4]; - char local_ip_str[MAX_IPV4_LEN]; - id2field_t id2field[LOG_COMMON_MAX]; - rd_kafka_topic_t **topic_rkt; - id2field_t *service2topic; -}; - typedef enum _tsg_log_field_id { LOG_COMMON_SERVICE, @@ -90,6 +61,31 @@ typedef enum _tsg_log_field_id LOG_COMMON_MAX }tsg_log_field_id_t; +typedef struct _id2field +{ + TLD_TYPE type; + int id; + char name[MAX_STRING_LEN]; +}id2field_t; + +struct _tld_handle +{ + int thread_id; + cJSON *object; +}; + +struct _tsg_log_instance +{ + int mode; + int max_service; + void *logger; + char common_field_file[MAX_STRING_LEN*4]; + char broker_list[MAX_STRING_LEN*4]; + char local_ip_str[MAX_IPV4_LEN]; + id2field_t id2field[LOG_COMMON_MAX]; + rd_kafka_topic_t **topic_rkt; + id2field_t *service2topic; +}; char *log_field_id2name(tsg_log_instance_t instance, tsg_log_field_id_t id); tsg_log_instance_t tsg_sendlog_init(const char *filename);