Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_kinesis_streams: Add Port config option for Kinesis plugin #9171

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion plugins/out_kinesis_streams/kinesis.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static int cb_kinesis_init(struct flb_output_instance *ins,
ctx->kinesis_client->region = (char *) ctx->region;
ctx->kinesis_client->retry_requests = ctx->retry_requests;
ctx->kinesis_client->service = "kinesis";
ctx->kinesis_client->port = 443;
ctx->kinesis_client->port = ctx->port;
ctx->kinesis_client->flags = 0;
ctx->kinesis_client->proxy = NULL;
ctx->kinesis_client->static_headers = &content_type_header;
Expand Down Expand Up @@ -440,6 +440,12 @@ static struct flb_config_map config_map[] = {
"Specify a custom endpoint for the Kinesis API"
},

{
FLB_CONFIG_MAP_INT, "port", "443",
0, FLB_TRUE, offsetof(struct flb_kinesis, port),
"Specify a port for the Kinesis API"
},

{
FLB_CONFIG_MAP_STR, "sts_endpoint", NULL,
0, FLB_TRUE, offsetof(struct flb_kinesis, sts_endpoint),
Expand Down
1 change: 1 addition & 0 deletions plugins/out_kinesis_streams/kinesis.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ struct flb_kinesis {
const char *role_arn;
const char *log_key;
const char *external_id;
const int port;
int retry_requests;
char *sts_endpoint;
int custom_endpoint;
Expand Down
1 change: 1 addition & 0 deletions tests/runtime/out_kinesis.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ void flb_test_firehose_success(void)
flb_output_set(ctx, out_ffd,"stream", "fluent", NULL);
flb_output_set(ctx, out_ffd,"time_key", "time", NULL);
flb_output_set(ctx, out_ffd,"Retry_Limit", "1", NULL);
flb_output_set(ctx, out_ffd,"port", "443", NULL);

ret = flb_start(ctx);
TEST_CHECK(ret == 0);
Expand Down