Skip to content

Commit

Permalink
Merge pull request #341 from cole-miller/create-v2
Browse files Browse the repository at this point in the history
Create v2
  • Loading branch information
cole-miller authored Oct 22, 2024
2 parents 6702ded + 0e63e20 commit 36d68a8
Show file tree
Hide file tree
Showing 40 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
env:
GO_DQLITE_MULTITHREAD: 1
run: |
go install -tags libsqlite3 github.com/canonical/go-dqlite/cmd/dqlite-benchmark
go install -tags libsqlite3 github.com/canonical/go-dqlite/v2/cmd/dqlite-benchmark
dqlite-benchmark --db 127.0.0.1:9001 --driver --cluster 127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003 --workload kvreadwrite &
masterpid=$!
dqlite-benchmark --db 127.0.0.1:9002 --join 127.0.0.1:9001 &
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
GO_DQLITE_MULTITHREAD: 1
run: |
go get -t -tags libsqlite3 ./...
go install -tags libsqlite3 github.com/canonical/go-dqlite/cmd/dqlite-benchmark
go install -tags libsqlite3 github.com/canonical/go-dqlite/v2/cmd/dqlite-benchmark
dqlite-benchmark --db 127.0.0.1:9001 --duration 3600 --driver --cluster 127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003 --workload kvreadwrite &
masterpid=$!
dqlite-benchmark --db 127.0.0.1:9002 --join 127.0.0.1:9001 &
Expand Down
8 changes: 4 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"sync/atomic"
"time"

"github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/pkg/errors"
"golang.org/x/sync/semaphore"
)
Expand Down
4 changes: 2 additions & 2 deletions app/app_go1.18_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package app_test
// "net"
// "testing"

// "github.com/canonical/go-dqlite/app"
// "github.com/canonical/go-dqlite/client"
// "github.com/canonical/go-dqlite/v2/app"
// "github.com/canonical/go-dqlite/v2/client"
// "github.com/quic-go/quic-go"
// "github.com/stretchr/testify/assert"
// "github.com/stretchr/testify/require"
Expand Down
6 changes: 3 additions & 3 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion app/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"net"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"
)

// Like client.DialFuncWithTLS but also starts the proxy, since the raft
Expand Down
2 changes: 1 addition & 1 deletion app/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io/ioutil"
"os"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/v2/app"
)

// To start the first node of a dqlite cluster for the first time, its network
Expand Down
6 changes: 3 additions & 3 deletions app/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"
"time"

"github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/internal/protocol"
)

// Option can be used to tweak app parameters.
Expand Down
2 changes: 1 addition & 1 deletion app/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
import (
"sort"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/client"
)

const minVoters = 3
Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"path"
"time"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/client"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/benchmark"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/benchmark"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"context"

"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/pkg/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

dqlite "github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
dqlite "github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion client/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package client

import (
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/protocol"
)

// Node roles
Expand Down
2 changes: 1 addition & 1 deletion client/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"crypto/tls"
"net"

"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/protocol"
)

// DefaultDialFunc is the default dial function, which can handle plain TCP and
Expand Down
4 changes: 2 additions & 2 deletions client/leader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

dqlite "github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
dqlite "github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion client/log.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package client

import (
"github.com/canonical/go-dqlite/logging"
"github.com/canonical/go-dqlite/v2/logging"
)

// LogFunc is a function that can be used for logging.
Expand Down
2 changes: 1 addition & 1 deletion client/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/google/renameio"
"gopkg.in/yaml.v2"

"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/protocol"
)

// NodeStore is used by a dqlite client to get an initial list of candidate
Expand Down
6 changes: 3 additions & 3 deletions client/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"database/sql"
"testing"

dqlite "github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/driver"
dqlite "github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/dqlite-benchmark/dqlite-benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"path/filepath"
"time"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/benchmark"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/benchmark"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/sys/unix"
Expand Down
4 changes: 2 additions & 2 deletions cmd/dqlite-demo/dqlite-demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"path/filepath"
"strings"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/client"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/sys/unix"
Expand Down
6 changes: 3 additions & 3 deletions cmd/dqlite/dqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/peterh/liner"
"github.com/spf13/cobra"

"github.com/canonical/go-dqlite/app"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/internal/shell"
"github.com/canonical/go-dqlite/v2/app"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/internal/shell"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"os"

"github.com/canonical/go-dqlite/internal/bindings"
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/bindings"
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/pkg/errors"
)

Expand Down
6 changes: 3 additions & 3 deletions driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (

"github.com/pkg/errors"

"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/tracing"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/canonical/go-dqlite/v2/tracing"
)

// Driver perform queries against a dqlite server.
Expand Down
8 changes: 4 additions & 4 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"testing"
"time"

dqlite "github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
dqlitedriver "github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/logging"
dqlite "github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
dqlitedriver "github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/go-dqlite/v2/logging"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
8 changes: 4 additions & 4 deletions driver/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"testing"
"time"

dqlite "github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/logging"
dqlite "github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/driver"
"github.com/canonical/go-dqlite/v2/logging"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/canonical/go-dqlite
module github.com/canonical/go-dqlite/v2

// This is to maintain the ppa package on focal
go 1.13
Expand Down
2 changes: 1 addition & 1 deletion internal/bindings/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ import (
"time"
"unsafe"

"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/protocol"
)

type Node struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/bindings/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/internal/bindings"
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/bindings"
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/bindings/sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package bindings

import (
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/v2/internal/protocol"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion internal/protocol/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/Rican7/retry"
"github.com/canonical/go-dqlite/logging"
"github.com/canonical/go-dqlite/v2/logging"
"github.com/pkg/errors"
"golang.org/x/sync/semaphore"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/protocol/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/internal/bindings"
"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/logging"
"github.com/canonical/go-dqlite/v2/internal/bindings"
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/canonical/go-dqlite/v2/logging"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/protocol/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"
"time"

"github.com/canonical/go-dqlite/internal/protocol"
"github.com/canonical/go-dqlite/logging"
"github.com/canonical/go-dqlite/v2/internal/protocol"
"github.com/canonical/go-dqlite/v2/logging"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/shell/options.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package shell

import "github.com/canonical/go-dqlite/client"
import "github.com/canonical/go-dqlite/v2/client"

// Option that can be used to tweak shell parameters.
type Option func(*options)
Expand Down
6 changes: 3 additions & 3 deletions internal/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"strings"
"text/tabwriter"

"github.com/canonical/go-dqlite"
"github.com/canonical/go-dqlite/client"
"github.com/canonical/go-dqlite/driver"
"github.com/canonical/go-dqlite/v2"
"github.com/canonical/go-dqlite/v2/client"
"github.com/canonical/go-dqlite/v2/driver"
)

// Shell can be used to implement interactive prompts for inspecting a dqlite
Expand Down
2 changes: 1 addition & 1 deletion logging/func_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package logging_test
import (
"testing"

"github.com/canonical/go-dqlite/logging"
"github.com/canonical/go-dqlite/v2/logging"
)

func Test_TestFunc(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion logging/level_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package logging_test
import (
"testing"

"github.com/canonical/go-dqlite/logging"
"github.com/canonical/go-dqlite/v2/logging"
"github.com/stretchr/testify/assert"
)

Expand Down
Loading

0 comments on commit 36d68a8

Please sign in to comment.