Skip to content

Commit

Permalink
Ignore token_x and token_y
Browse files Browse the repository at this point in the history
  • Loading branch information
puzpuzpuz committed Mar 22, 2024
1 parent 92b1f34 commit 8d83a81
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Features:
* Optimized for batch writes.
* Supports TLS encryption and ILP authentication.
* Automatic write retries and connection reuse for ILP over HTTP.
* Tested against QuestDB 7.3.11 and newer versions.
* Tested against QuestDB 7.3.10 and newer versions.

New in v3:
* Supports ILP over HTTP using the same client semantics
Expand Down
4 changes: 4 additions & 0 deletions conf_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func confFromStr(conf string) (*lineSenderConfig, error) {
default:
panic("add a case for " + k)
}
case "token_x":
case "token_y":
// Some clients require public key.
// But since Go sender doesn't need it, we ignore the values.
case "auto_flush":
if v == "off" {
senderConf.autoFlushRows = 0
Expand Down
10 changes: 10 additions & 0 deletions conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ func TestHappyCasesFromConf(t *testing.T) {
qdb.WithAuth(user, token),
},
},
{
name: "token_x and token_y (ignored)",
config: fmt.Sprintf("tcp::addr=%s;username=%s;token=%s;token_x=xyz;token_y=xyz;",
addr, user, token),
expectedOpts: []qdb.LineSenderOption{
qdb.WithTcp(),
qdb.WithAddress(addr),
qdb.WithAuth(user, token),
},
},
{
name: "init_buf_size and max_buf_size",
config: fmt.Sprintf("tcp::addr=%s;init_buf_size=%d;max_buf_size=%d;",
Expand Down

0 comments on commit 8d83a81

Please sign in to comment.