Skip to content

Commit

Permalink
wip chunked stream input
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanohnemus committed Dec 19, 2023
1 parent 047ca27 commit 9cf86df
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 94 deletions.
14 changes: 14 additions & 0 deletions include/fluent-bit/flb_http_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ struct flb_http_debug {
int (*cb_debug_request_payload);
};

struct flb_http_chunk_complete_callback;

/* Set a request type */
struct flb_http_client {
/* Upstream connection */
Expand Down Expand Up @@ -135,6 +137,13 @@ struct flb_http_client {

/* Reference to Callback context */
void *cb_ctx;
struct flb_http_chunk_complete_callback* cb_chunk_complete;
};

struct flb_http_chunk_complete_callback {
int (*cb)(struct flb_http_client *c, int* bytes_consumed, void* p1, void* p2);
void* p1;
void* p2;
};

void flb_http_client_debug(struct flb_http_client *c,
Expand Down Expand Up @@ -172,5 +181,10 @@ int flb_http_buffer_increase(struct flb_http_client *c, size_t size,
int flb_http_strip_port_from_host(struct flb_http_client *c);
int flb_http_allow_duplicated_headers(struct flb_http_client *c, int allow);
int flb_http_client_debug_property_is_valid(char *key, char *val);
int flb_http_client_set_chunk_complete_callback(struct flb_http_client *c,
int (*cb)(struct flb_http_client *c, int *bytes_consumed,
void* p1, void* p2),
void* p1,
void* p2);

#endif
Loading

0 comments on commit 9cf86df

Please sign in to comment.