-
Notifications
You must be signed in to change notification settings - Fork 19
BREAKING CHANGE: Create a Sender
or SenderBuilder
from configuration or env var (#54)
#54
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instead TCP is the default, and there are methods builder.tcp() and builder.http() to specify it.
6068e7f
to
e26c03e
Compare
amunra
commented
Mar 6, 2024
amunra
commented
Mar 6, 2024
amunra
commented
Mar 6, 2024
amunra
commented
Mar 6, 2024
amunra
commented
Mar 6, 2024
0d6d35d
to
e1ed09c
Compare
amunra
commented
Mar 11, 2024
amunra
commented
Mar 11, 2024
mtopolnik
approved these changes
Mar 11, 2024
Sender
or SenderBuilder
from configurationSender
or SenderBuilder
from configuration or env var (#54)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The aim here is to support the new ILP config string format as documented in https://docs.google.com/document/d/1EQZjYrJO_Ll8RrSIZpbr15Ul3N-xAtTxvrunI-TpOR8 and now also supported by the Java client and soon other clients too.
Changes
This introduces a new "configuration string" format that is being supported across all ILP clients.
The parser was already implemented as https://github.com/questdb/questdb-confstr-rs/.
The format is:
protocol::addr=host:port;key1=value1;key2=value2;...;
.The protocols supported are:
tcp
tcps
(with TLS)http
https
(with TLS)The Rust
SenderBuilder
, and the C and C++opts
object methods have been aligned to the new configuration format.For example in C++,
has been refactored to:
and is now equivalent to the conf string
and can now support building directly without the
opts
object:The config string can also be read from an environment variable:
HTTP
The config string can also be used to configure HTTP.
This is what creating a Rust client with HTTP+TLS looks like:
For HTTP authentication you can also use a token:
Progress
SenderBuilder::new()
toSenderBuilder::new_tcp()
and introduce a siblingSenderBuilder::new_http()
ctor.-> Result<Self>
for all params to allow immediate validation failure.tcps
andhttps
net_interface
should be part of the doc - ensure it can't be used for HTTP (I've got an open request with theureq
crate).Sender::from_conf
andSender::from_env
constructors.SenderBuilder::connect
.SenderBuilder::connect()
toSenderBuilder::build()
-- since it would be misleading for HTTP where no connection takes place.err_out
params.system_test/questdb_line_sender.py
.grace_timeout
andmin_throughput
are still the valid names.from_conf
andfrom_env
for bothSenderBuilder
andSender
APIs.master
code: PossiblyHEAD
is no longer supported for the/
path on HTTP with the latest questdb changes in master.from_conf
example for each of Rust / C / C++ and register them to the manifest file for cloud and docs.