3.1.0
Release overview
API improvements including a pool of HTTP senders.
What is new
- Add sender pool (experimental API) #47
package main
import (
"context"
qdb "github.com/questdb/go-questdb-client/v3"
)
func main() {
ctx := context.TODO()
pool := qdb.PoolFromConf("http::addr=localhost:9000")
defer func() {
err := pool.Close(ctx)
if err != nil {
panic(err)
}
}()
sender, err := pool.Acquire(ctx)
if err != nil {
panic(err)
}
sender.Table("prices").
Symbol("ticker", "AAPL").
Float64Column("price", 123.45).
AtNow(ctx)
if err := pool.Release(ctx, sender); err != nil {
panic(err)
}
}
Note that the pool only supports HTTP senders.