Skip to content

Commit aa355d2

Browse files
tchronoedsiper
authored andcommitted
out_kafka: rename struct flb_kafka to flb_out_kafka
Signed-off-by: Thiago Padilha <[email protected]>
1 parent 1f077d9 commit aa355d2

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

plugins/out_kafka/kafka.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
void cb_kafka_msg(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage,
2929
void *opaque)
3030
{
31-
struct flb_kafka *ctx = (struct flb_kafka *) opaque;
31+
struct flb_out_kafka *ctx = (struct flb_out_kafka *) opaque;
3232

3333
if (rkmessage->err) {
3434
flb_plg_warn(ctx->ins, "message delivery failed: %s",
@@ -44,9 +44,9 @@ void cb_kafka_msg(rd_kafka_t *rk, const rd_kafka_message_t *rkmessage,
4444
void cb_kafka_logger(const rd_kafka_t *rk, int level,
4545
const char *fac, const char *buf)
4646
{
47-
struct flb_kafka *ctx;
47+
struct flb_out_kafka *ctx;
4848

49-
ctx = (struct flb_kafka *) rd_kafka_opaque(rk);
49+
ctx = (struct flb_out_kafka *) rd_kafka_opaque(rk);
5050

5151
if (level <= FLB_KAFKA_LOG_ERR) {
5252
flb_plg_error(ctx->ins, "%s: %s",
@@ -70,7 +70,7 @@ static int cb_kafka_init(struct flb_output_instance *ins,
7070
struct flb_config *config,
7171
void *data)
7272
{
73-
struct flb_kafka *ctx;
73+
struct flb_out_kafka *ctx;
7474

7575
/* Configuration */
7676
ctx = flb_kafka_conf_create(ins, config);
@@ -85,7 +85,7 @@ static int cb_kafka_init(struct flb_output_instance *ins,
8585
}
8686

8787
int produce_message(struct flb_time *tm, msgpack_object *map,
88-
struct flb_kafka *ctx, struct flb_config *config)
88+
struct flb_out_kafka *ctx, struct flb_config *config)
8989
{
9090
int i;
9191
int ret;
@@ -459,7 +459,7 @@ static void cb_kafka_flush(struct flb_event_chunk *event_chunk,
459459

460460
int ret;
461461
size_t off = 0;
462-
struct flb_kafka *ctx = out_context;
462+
struct flb_out_kafka *ctx = out_context;
463463
struct flb_time tms;
464464
msgpack_object *obj;
465465
msgpack_unpacked result;
@@ -497,7 +497,7 @@ static void cb_kafka_flush(struct flb_event_chunk *event_chunk,
497497

498498
static int cb_kafka_exit(void *data, struct flb_config *config)
499499
{
500-
struct flb_kafka *ctx = data;
500+
struct flb_out_kafka *ctx = data;
501501

502502
flb_kafka_conf_destroy(ctx);
503503
return 0;

plugins/out_kafka/kafka_config.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@
2727
#include "kafka_topic.h"
2828
#include "kafka_callbacks.h"
2929

30-
struct flb_kafka *flb_kafka_conf_create(struct flb_output_instance *ins,
31-
struct flb_config *config)
30+
struct flb_out_kafka *flb_kafka_conf_create(struct flb_output_instance *ins,
31+
struct flb_config *config)
3232
{
3333
int ret;
3434
const char *tmp;
3535
char errstr[512];
3636
struct mk_list *head;
3737
struct mk_list *topics;
3838
struct flb_split_entry *entry;
39-
struct flb_kafka *ctx;
39+
struct flb_out_kafka *ctx;
4040
struct flb_kv *kv;
4141

4242
/* Configuration context */
43-
ctx = flb_calloc(1, sizeof(struct flb_kafka));
43+
ctx = flb_calloc(1, sizeof(struct flb_out_kafka));
4444
if (!ctx) {
4545
flb_errno();
4646
return NULL;
@@ -288,7 +288,7 @@ struct flb_kafka *flb_kafka_conf_create(struct flb_output_instance *ins,
288288
return ctx;
289289
}
290290

291-
int flb_kafka_conf_destroy(struct flb_kafka *ctx)
291+
int flb_kafka_conf_destroy(struct flb_out_kafka *ctx)
292292
{
293293
if (!ctx) {
294294
return 0;

plugins/out_kafka/kafka_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct flb_kafka_topic {
6060
struct mk_list _head;
6161
};
6262

63-
struct flb_kafka {
63+
struct flb_out_kafka {
6464
/* Config Parameters */
6565
int format;
6666
char *brokers;
@@ -122,8 +122,8 @@ struct flb_kafka {
122122

123123
};
124124

125-
struct flb_kafka *flb_kafka_conf_create(struct flb_output_instance *ins,
125+
struct flb_out_kafka *flb_kafka_conf_create(struct flb_output_instance *ins,
126126
struct flb_config *config);
127-
int flb_kafka_conf_destroy(struct flb_kafka *ctx);
127+
int flb_kafka_conf_destroy(struct flb_out_kafka *ctx);
128128

129129
#endif

plugins/out_kafka/kafka_topic.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "rdkafka.h"
2626

2727
struct flb_kafka_topic *flb_kafka_topic_create(char *name,
28-
struct flb_kafka *ctx)
28+
struct flb_out_kafka *ctx)
2929
{
3030
rd_kafka_topic_t *tp;
3131
struct flb_kafka_topic *topic;
@@ -52,7 +52,7 @@ struct flb_kafka_topic *flb_kafka_topic_create(char *name,
5252
}
5353

5454
int flb_kafka_topic_destroy(struct flb_kafka_topic *topic,
55-
struct flb_kafka *ctx)
55+
struct flb_out_kafka *ctx)
5656
{
5757
mk_list_del(&topic->_head);
5858
rd_kafka_topic_destroy(topic->tp);
@@ -62,7 +62,7 @@ int flb_kafka_topic_destroy(struct flb_kafka_topic *topic,
6262
return 0;
6363
}
6464

65-
int flb_kafka_topic_destroy_all(struct flb_kafka *ctx)
65+
int flb_kafka_topic_destroy_all(struct flb_out_kafka *ctx)
6666
{
6767
int c = 0;
6868
struct mk_list *tmp;
@@ -79,7 +79,7 @@ int flb_kafka_topic_destroy_all(struct flb_kafka *ctx)
7979
}
8080

8181
/* Get first topic of the list (default topic) */
82-
struct flb_kafka_topic *flb_kafka_topic_default(struct flb_kafka *ctx)
82+
struct flb_kafka_topic *flb_kafka_topic_default(struct flb_out_kafka *ctx)
8383
{
8484
struct flb_kafka_topic *topic;
8585

@@ -94,7 +94,7 @@ struct flb_kafka_topic *flb_kafka_topic_default(struct flb_kafka *ctx)
9494

9595
struct flb_kafka_topic *flb_kafka_topic_lookup(char *name,
9696
int name_len,
97-
struct flb_kafka *ctx)
97+
struct flb_out_kafka *ctx)
9898
{
9999
struct mk_list *head;
100100
struct flb_kafka_topic *topic;

plugins/out_kafka/kafka_topic.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
#define FLB_KAFKA_TOPIC_H
2222

2323
struct flb_kafka_topic *flb_kafka_topic_create(char *name,
24-
struct flb_kafka *ctx);
24+
struct flb_out_kafka *ctx);
2525
int flb_kafka_topic_destroy(struct flb_kafka_topic *topic,
26-
struct flb_kafka *ctx);
27-
int flb_kafka_topic_destroy_all(struct flb_kafka *ctx);
28-
struct flb_kafka_topic *flb_kafka_topic_default(struct flb_kafka *ctx);
26+
struct flb_out_kafka *ctx);
27+
int flb_kafka_topic_destroy_all(struct flb_out_kafka *ctx);
28+
struct flb_kafka_topic *flb_kafka_topic_default(struct flb_out_kafka *ctx);
2929

3030
struct flb_kafka_topic *flb_kafka_topic_lookup(char *name,
3131
int name_len,
32-
struct flb_kafka *ctx);
32+
struct flb_out_kafka *ctx);
3333

3434
#endif

0 commit comments

Comments
 (0)