diff --git a/README.md b/README.md index 23e1865..9b5a83c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![build](https://github.com/zikwall/clickhouse-buffer/workflows/build_and_tests/badge.svg)](https://github.com/zikwall/clickhouse-buffer/v3/actions) -[![build](https://github.com/zikwall/clickhouse-buffer/workflows/golangci_lint/badge.svg)](https://github.com/zikwall/clickhouse-buffer/v3/actions) +[![build](https://github.com/zikwall/clickhouse-buffer/workflows/build_and_tests/badge.svg)](https://github.com/zikwall/clickhouse-buffer/v4/actions) +[![build](https://github.com/zikwall/clickhouse-buffer/workflows/golangci_lint/badge.svg)](https://github.com/zikwall/clickhouse-buffer/v4/actions)

Clickhouse Buffer

@@ -42,9 +42,9 @@ This is due to the fact that Clickhouse is designed so that it better processes import ( "database/sql" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxsql" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxsql" ) // if you already have a connection to Clickhouse you can just use wrappers @@ -98,9 +98,9 @@ ch, conn, err := cxsql.NewClickhouse(ctx, &clickhouse.Options{ ```go import ( - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxmem" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxmem" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) // create root client client := clickhousebuffer.NewClientWithOptions(ctx, ch, @@ -264,7 +264,7 @@ $ go test -race -v ./... -tags=integration ```shell goos: linux goarch: amd64 -pkg: github.com/zikwall/clickhouse-buffer/v3/bench +pkg: github.com/zikwall/clickhouse-buffer/v4/bench cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz ``` @@ -331,7 +331,7 @@ BenchmarkInsertRedisVectors/10-12 100 202146 ns/op ```shell goos: darwin goarch: arm64 -pkg: github.com/zikwall/clickhouse-buffer/v3/bench +pkg: github.com/zikwall/clickhouse-buffer/v4/bench ``` ```shell diff --git a/bench/encode_decode_test.go b/bench/encode_decode_test.go index 4178c42..965fb91 100644 --- a/bench/encode_decode_test.go +++ b/bench/encode_decode_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type row struct { @@ -19,7 +19,7 @@ func (r *row) Row() cx.Vector { // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkEncodeRow/1000000-12 100 30361854 ns/op 15847294 B/op 240014 allocs/op // BenchmarkEncodeRow/100000-12 100 2946954 ns/op 1584748 B/op 24001 allocs/op @@ -65,7 +65,7 @@ func BenchmarkEncodeRow(b *testing.B) { // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkDecodeRow/100000-12 100 17739535 ns/op 7653390 B/op 200064 allocs/op // BenchmarkDecodeRow/10000-12 100 1867818 ns/op 765345 B/op 20006 allocs/op diff --git a/bench/insert_redis_test.go b/bench/insert_redis_test.go index 218cbf2..1dbf0e7 100644 --- a/bench/insert_redis_test.go +++ b/bench/insert_redis_test.go @@ -8,16 +8,16 @@ import ( "github.com/go-redis/redis/v8" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxredis" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxredis" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) // x100 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertRedisObjects/1000-12 100 22404356 ns/op 96095 B/op 2322 allocs/op // BenchmarkInsertRedisObjects/100-12 100 2243544 ns/op 9673 B/op 233 allocs/op @@ -110,7 +110,7 @@ func BenchmarkInsertRedisObjects(b *testing.B) { // x100 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertRedisVectors/1000-12 100 22145258 ns/op 92766 B/op 2274 allocs/op // BenchmarkInsertRedisVectors/100-12 100 2320692 ns/op 9339 B/op 229 allocs/op diff --git a/bench/insert_simple_test.go b/bench/insert_simple_test.go index 05b8dd9..974b863 100644 --- a/bench/insert_simple_test.go +++ b/bench/insert_simple_test.go @@ -6,10 +6,10 @@ import ( "time" "github.com/ClickHouse/clickhouse-go/v2/lib/driver" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type BenchTable struct { @@ -39,7 +39,7 @@ func (c *clickhouseMock) Conn() driver.Conn { // x50 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertSimplestPreallocateVectors/1000000-12 1000 142919 ns/op 0 B/op 0 allocs/op // BenchmarkInsertSimplestPreallocateVectors/100000-12 1000 12498 ns/op 0 B/op 0 allocs/op @@ -136,7 +136,7 @@ func BenchmarkInsertSimplestPreallocateVectors(b *testing.B) { // x1000 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertSimplestPreallocateObjects/1000000-12 1000 399110 ns/op 88000 B/op 3000 allocs/op // BenchmarkInsertSimplestPreallocateObjects/100000-12 1000 37527 ns/op 8800 B/op 300 allocs/op @@ -233,7 +233,7 @@ func BenchmarkInsertSimplestPreallocateObjects(b *testing.B) { // x1000 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertSimplestObjects/1000000-12 1000 454794 ns/op 160002 B/op 4000 allocs/op // BenchmarkInsertSimplestObjects/100000-12 1000 41879 ns/op 16000 B/op 400 allocs/op @@ -330,7 +330,7 @@ func BenchmarkInsertSimplestObjects(b *testing.B) { // X1000 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertSimplestObjectsJust/10000000-12 1000 4705290 ns/op 1360000 B/op 40000 allocs/op // BenchmarkInsertSimplestObjectsJust/1000000-12 1000 410051 ns/op 136000 B/op 4000 allocs/op @@ -428,7 +428,7 @@ func BenchmarkInsertSimplestObjectsJust(b *testing.B) { // x1000 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertSimplestVectors/1000000-12 1000 182548 ns/op 72002 B/op 1000 allocs/op // BenchmarkInsertSimplestVectors/100000-12 1000 16291 ns/op 7200 B/op 100 allocs/op @@ -525,7 +525,7 @@ func BenchmarkInsertSimplestVectors(b *testing.B) { // X1000 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertSimplestVectorsJust/10000000-12 1000 2059182 ns/op 480000 B/op 10000 allocs/op // BenchmarkInsertSimplestVectorsJust/1000000-12 1000 176129 ns/op 48000 B/op 1000 allocs/op @@ -623,7 +623,7 @@ func BenchmarkInsertSimplestVectorsJust(b *testing.B) { // X1000 // goos: linux // goarch: amd64 -// pkg: github.com/zikwall/clickhouse-buffer/v3/bench +// pkg: github.com/zikwall/clickhouse-buffer/v4/bench // cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz // BenchmarkInsertSimplestEmptyVectors/1000000-12 1000 132887 ns/op 24002 B/op 0 allocs/op // BenchmarkInsertSimplestEmptyVectors/100000-12 1000 13404 ns/op 2400 B/op 0 allocs/op diff --git a/client.go b/client.go index e39c258..6bba400 100644 --- a/client.go +++ b/client.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/retry" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/retry" ) // Client main interface, provides a top-level API. diff --git a/example/cmd/advanced/main.go b/example/cmd/advanced/main.go index 7fae4dd..ecced15 100644 --- a/example/cmd/advanced/main.go +++ b/example/cmd/advanced/main.go @@ -10,11 +10,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" "github.com/google/uuid" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) func main() { diff --git a/example/cmd/advanced_redis/main.go b/example/cmd/advanced_redis/main.go index d62e606..1446da9 100644 --- a/example/cmd/advanced_redis/main.go +++ b/example/cmd/advanced_redis/main.go @@ -12,11 +12,11 @@ import ( "github.com/go-redis/redis/v8" "github.com/google/uuid" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxredis" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxredis" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) func main() { diff --git a/example/cmd/redis/main.go b/example/cmd/redis/main.go index 77fbae1..134a026 100644 --- a/example/cmd/redis/main.go +++ b/example/cmd/redis/main.go @@ -11,11 +11,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" "github.com/go-redis/redis/v8" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxredis" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxredis" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) func main() { diff --git a/example/cmd/redis_safe/main.go b/example/cmd/redis_safe/main.go index d30437b..342c3f9 100644 --- a/example/cmd/redis_safe/main.go +++ b/example/cmd/redis_safe/main.go @@ -11,11 +11,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" "github.com/go-redis/redis/v8" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxredis" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxredis" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) func main() { diff --git a/example/cmd/redis_sql/main.go b/example/cmd/redis_sql/main.go index 6038b9d..89659f1 100644 --- a/example/cmd/redis_sql/main.go +++ b/example/cmd/redis_sql/main.go @@ -11,11 +11,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" "github.com/go-redis/redis/v8" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxredis" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxsql" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxredis" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxsql" ) func main() { diff --git a/example/cmd/simple/main.go b/example/cmd/simple/main.go index de90883..a704dcd 100644 --- a/example/cmd/simple/main.go +++ b/example/cmd/simple/main.go @@ -10,11 +10,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) func main() { diff --git a/example/cmd/simple_2/main.go b/example/cmd/simple_2/main.go index 1539797..89b3702 100644 --- a/example/cmd/simple_2/main.go +++ b/example/cmd/simple_2/main.go @@ -9,11 +9,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) func main() { diff --git a/example/cmd/simple_safe/main.go b/example/cmd/simple_safe/main.go index 998eb78..c453e2f 100644 --- a/example/cmd/simple_safe/main.go +++ b/example/cmd/simple_safe/main.go @@ -10,11 +10,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" ) func main() { diff --git a/example/cmd/simple_sql/main.go b/example/cmd/simple_sql/main.go index e042c4b..92bca97 100644 --- a/example/cmd/simple_sql/main.go +++ b/example/cmd/simple_sql/main.go @@ -10,11 +10,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/example/pkg/tables" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxsql" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/example/pkg/tables" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxsql" ) func main() { diff --git a/example/pkg/tables/advanced.go b/example/pkg/tables/advanced.go index 4963efd..6d69617 100644 --- a/example/pkg/tables/advanced.go +++ b/example/pkg/tables/advanced.go @@ -8,7 +8,7 @@ import ( "github.com/ClickHouse/clickhouse-go/v2/lib/driver" "github.com/google/uuid" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type AdvancedTable struct { diff --git a/example/pkg/tables/example.go b/example/pkg/tables/example.go index e6cdc20..2e100bc 100644 --- a/example/pkg/tables/example.go +++ b/example/pkg/tables/example.go @@ -7,7 +7,7 @@ import ( "time" "github.com/ClickHouse/clickhouse-go/v2/lib/driver" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type ExampleTable struct { diff --git a/go.mod b/go.mod index bcba7bc..6f302f6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/zikwall/clickhouse-buffer/v3 +module github.com/zikwall/clickhouse-buffer/v4 go 1.18 @@ -6,13 +6,13 @@ require ( github.com/ClickHouse/clickhouse-go/v2 v2.0.15 github.com/Rican7/retry v0.3.1 github.com/go-redis/redis/v8 v8.11.5 + github.com/google/uuid v1.3.0 ) require ( github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/google/uuid v1.3.0 // indirect github.com/paulmach/orb v0.7.1 // indirect github.com/pierrec/lz4/v4 v4.1.14 // indirect github.com/shopspring/decimal v1.3.1 // indirect diff --git a/src/buffer/cxmem/buffer.go b/src/buffer/cxmem/buffer.go index c669be6..daf9704 100644 --- a/src/buffer/cxmem/buffer.go +++ b/src/buffer/cxmem/buffer.go @@ -1,7 +1,7 @@ package cxmem import ( - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type memory struct { diff --git a/src/buffer/cxredis/buffer.go b/src/buffer/cxredis/buffer.go index 36f8f50..2a4b356 100644 --- a/src/buffer/cxredis/buffer.go +++ b/src/buffer/cxredis/buffer.go @@ -4,7 +4,7 @@ import ( "log" "sync/atomic" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) func (r *redisBuffer) Write(row cx.Vector) { diff --git a/src/buffer/cxredis/connection.go b/src/buffer/cxredis/connection.go index 025b8b2..464b81e 100644 --- a/src/buffer/cxredis/connection.go +++ b/src/buffer/cxredis/connection.go @@ -6,7 +6,7 @@ import ( "github.com/go-redis/redis/v8" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) const prefix = "ch_buffer" diff --git a/src/buffer/cxsyncmem/buffer.go b/src/buffer/cxsyncmem/buffer.go index 1a16cde..5593e66 100644 --- a/src/buffer/cxsyncmem/buffer.go +++ b/src/buffer/cxsyncmem/buffer.go @@ -3,7 +3,7 @@ package cxsyncmem import ( "sync" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) // special for tests with locks diff --git a/src/db/cxnative/impl.go b/src/db/cxnative/impl.go index 29262e3..f30579c 100644 --- a/src/db/cxnative/impl.go +++ b/src/db/cxnative/impl.go @@ -10,7 +10,7 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" "github.com/ClickHouse/clickhouse-go/v2/lib/driver" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type clickhouseNative struct { diff --git a/src/db/cxsql/impl.go b/src/db/cxsql/impl.go index 9a4361a..ca5fcbf 100644 --- a/src/db/cxsql/impl.go +++ b/src/db/cxsql/impl.go @@ -10,7 +10,7 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type clickhouseSQL struct { diff --git a/src/retry/retry.go b/src/retry/retry.go index 4d0e8d9..b9b3587 100644 --- a/src/retry/retry.go +++ b/src/retry/retry.go @@ -8,7 +8,7 @@ import ( "github.com/Rican7/retry/backoff" "github.com/Rican7/retry/strategy" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) const ( diff --git a/src/retry/retry_writer.go b/src/retry/retry_writer.go index 43d452e..75cf86b 100644 --- a/src/retry/retry_writer.go +++ b/src/retry/retry_writer.go @@ -3,7 +3,7 @@ package retry import ( "context" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type Writeable interface { diff --git a/tests/buffer_row_test.go b/tests/buffer_row_test.go index d4c0e1f..4255f6d 100644 --- a/tests/buffer_row_test.go +++ b/tests/buffer_row_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) type RowTestMock struct { diff --git a/tests/client_impl_test.go b/tests/client_impl_test.go index 7747f2d..87adc92 100644 --- a/tests/client_impl_test.go +++ b/tests/client_impl_test.go @@ -11,9 +11,9 @@ import ( "github.com/ClickHouse/clickhouse-go/v2" "github.com/ClickHouse/clickhouse-go/v2/lib/driver" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxsyncmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxsyncmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) var ( diff --git a/tests/integration_memory_test.go b/tests/integration_memory_test.go index d1d051b..e2ba27d 100644 --- a/tests/integration_memory_test.go +++ b/tests/integration_memory_test.go @@ -8,9 +8,9 @@ import ( "log" "testing" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxsyncmem" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxsyncmem" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) // nolint:dupl // it's OK diff --git a/tests/integration_test.go b/tests/integration_test.go index 8b6e407..b1217f0 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -18,11 +18,11 @@ import ( "github.com/ClickHouse/clickhouse-go/v2/lib/driver" "github.com/go-redis/redis/v8" - clickhousebuffer "github.com/zikwall/clickhouse-buffer/v3" - "github.com/zikwall/clickhouse-buffer/v3/src/buffer/cxredis" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxnative" - "github.com/zikwall/clickhouse-buffer/v3/src/db/cxsql" + clickhousebuffer "github.com/zikwall/clickhouse-buffer/v4" + "github.com/zikwall/clickhouse-buffer/v4/src/buffer/cxredis" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxnative" + "github.com/zikwall/clickhouse-buffer/v4/src/db/cxsql" ) const integrationTableName = "default.test_integration_xxx_xxx" diff --git a/write.go b/write.go index c96f697..29864e7 100644 --- a/write.go +++ b/write.go @@ -6,7 +6,7 @@ import ( "sync/atomic" "time" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) // Writer is client interface with non-blocking methods for writing rows asynchronously in batches into an Clickhouse server. diff --git a/write_blocking.go b/write_blocking.go index c082ee8..7809b2b 100644 --- a/write_blocking.go +++ b/write_blocking.go @@ -3,7 +3,7 @@ package clickhousebuffer import ( "context" - "github.com/zikwall/clickhouse-buffer/v3/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" ) // WriterBlocking similar to Writer except that this interface must implement a blocking entry. diff --git a/write_options.go b/write_options.go index 1103b1f..36f870e 100644 --- a/write_options.go +++ b/write_options.go @@ -1,8 +1,8 @@ package clickhousebuffer import ( - "github.com/zikwall/clickhouse-buffer/v3/src/cx" - "github.com/zikwall/clickhouse-buffer/v3/src/retry" + "github.com/zikwall/clickhouse-buffer/v4/src/cx" + "github.com/zikwall/clickhouse-buffer/v4/src/retry" ) // Options holds write configuration properties