1
- [ ![ GoDoc reference] ( https://img.shields.io/badge/godoc-reference-blue.svg )] ( https://pkg.go.dev/github.com/questdb/go-questdb-client/v2 )
1
+ [ ![ GoDoc reference] ( https://img.shields.io/badge/godoc-reference-blue.svg )] ( https://pkg.go.dev/github.com/questdb/go-questdb-client/v3 )
2
2
3
3
# go-questdb-client
4
4
5
- Golang client for QuestDB's Influx Line Protocol over TCP.
5
+ Golang client for QuestDB's [ Influx Line Protocol] ( https://questdb.io/docs/reference/api/ilp/overview/ )
6
+ (ILP) over HTTP and TCP. This library makes it easy to insert data into
7
+ [ QuestDB] ( https://questdb.io ) .
6
8
7
9
Features:
8
10
* Context-aware API.
9
11
* Optimized for batch writes.
10
- * Supports TLS encryption and [ ILP authentication] ( https://questdb.io/docs/reference/api/ilp/authenticate ) .
11
- * Tested against QuestDB 7.3.2 and newer versions.
12
+ * Supports TLS encryption and ILP authentication.
13
+ * Automatic write retries and connection reuse for ILP over HTTP.
14
+ * Tested against QuestDB 7.3.11 and newer versions.
12
15
13
- Documentation is available [ here] ( https://pkg.go.dev/github.com/questdb/go-questdb-client/v2 ) .
16
+ New in v3:
17
+ * Supports ILP over HTTP using the same client semantics
14
18
15
- ## Usage
19
+ Documentation is available [ here] ( https://pkg.go.dev/github.com/questdb/go-questdb-client/v3 ) .
20
+
21
+ ## Quickstart
16
22
17
23
``` go
18
24
package main
@@ -23,13 +29,13 @@ import (
23
29
" log"
24
30
" time"
25
31
26
- qdb " github.com/questdb/go-questdb-client/v2 "
32
+ qdb " github.com/questdb/go-questdb-client/v3 "
27
33
)
28
34
29
35
func main () {
30
36
ctx := context.TODO ()
31
- // Connect to QuestDB running on 127.0.0.1:9009
32
- sender , err := qdb.NewLineSender (ctx)
37
+ // Connect to QuestDB running locally.
38
+ sender , err := qdb.LineSenderFromConf (ctx, " http::addr=localhost:9000; " )
33
39
if err != nil {
34
40
log.Fatal (err)
35
41
}
@@ -59,3 +65,17 @@ func main() {
59
65
}
60
66
}
61
67
```
68
+
69
+ To connect via TCP, set the configuration string to:
70
+ ``` go
71
+ // ...
72
+ sender , err := qdb.LineSenderFromConf (ctx, " tcp::addr=localhost:9009;" )
73
+ // ...
74
+ ```
75
+
76
+ ## Community
77
+
78
+ If you need help, have additional questions or want to provide feedback, you
79
+ may find us on [ Slack] ( https://slack.questdb.io ) .
80
+ You can also [ sign up to our mailing list] ( https://questdb.io/community/ )
81
+ to get notified of new releases.
0 commit comments