Skip to content

Commit 2ff1247

Browse files
Added Port config option for Kinesis plugin
Signed-off-by: Athish Pranav D <[email protected]>
1 parent a86dcee commit 2ff1247

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

plugins/out_kinesis_streams/kinesis.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ static int cb_kinesis_init(struct flb_output_instance *ins,
113113
ctx->custom_endpoint = FLB_FALSE;
114114
}
115115

116+
tmp = flb_output_get_property("port", ins);
117+
if (tmp) {
118+
ctx->port = tmp;
119+
}
120+
116121
tmp = flb_output_get_property("sts_endpoint", ins);
117122
if (tmp) {
118123
ctx->sts_endpoint = (char *) tmp;
@@ -255,7 +260,7 @@ static int cb_kinesis_init(struct flb_output_instance *ins,
255260
ctx->kinesis_client->region = (char *) ctx->region;
256261
ctx->kinesis_client->retry_requests = ctx->retry_requests;
257262
ctx->kinesis_client->service = "kinesis";
258-
ctx->kinesis_client->port = 443;
263+
ctx->kinesis_client->port = ctx->port;
259264
ctx->kinesis_client->flags = 0;
260265
ctx->kinesis_client->proxy = NULL;
261266
ctx->kinesis_client->static_headers = &content_type_header;
@@ -440,6 +445,12 @@ static struct flb_config_map config_map[] = {
440445
"Specify a custom endpoint for the Kinesis API"
441446
},
442447

448+
{
449+
FLB_CONFIG_MAP_INT, "port", 443,
450+
0, FLB_FALSE, 0,
451+
"Specify a port for the Kinesis API"
452+
},
453+
443454
{
444455
FLB_CONFIG_MAP_STR, "sts_endpoint", NULL,
445456
0, FLB_TRUE, offsetof(struct flb_kinesis, sts_endpoint),

0 commit comments

Comments
 (0)