From b3c99baba5fd587c9f4a2af548d61ff02675b908 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 10 Oct 2024 20:24:55 -0400 Subject: [PATCH] Drop embedded LeaderTracker Signed-off-by: Cole Miller --- client/database_store.go | 2 -- client/store.go | 1 - internal/protocol/store.go | 1 - 3 files changed, 4 deletions(-) diff --git a/client/database_store.go b/client/database_store.go index 9c1f2a01..17ef7eb9 100644 --- a/client/database_store.go +++ b/client/database_store.go @@ -9,7 +9,6 @@ import ( "fmt" "strings" - "github.com/canonical/go-dqlite/internal/protocol" _ "github.com/mattn/go-sqlite3" // Go SQLite bindings "github.com/pkg/errors" ) @@ -23,7 +22,6 @@ type nodeStoreOptions struct { // DatabaseNodeStore persists a list addresses of dqlite nodes in a SQL table. type DatabaseNodeStore struct { - protocol.LeaderTracker db *sql.DB // Database handle to use. schema string // Name of the schema holding the servers table. table string // Name of the servers table. diff --git a/client/store.go b/client/store.go index a83976be..6e12646d 100644 --- a/client/store.go +++ b/client/store.go @@ -30,7 +30,6 @@ var NewInmemNodeStore = protocol.NewInmemNodeStore // Persists a list addresses of dqlite nodes in a YAML file. type YamlNodeStore struct { - protocol.LeaderTracker path string servers []NodeInfo mu sync.RWMutex diff --git a/internal/protocol/store.go b/internal/protocol/store.go index 95e65af4..5930e5c5 100644 --- a/internal/protocol/store.go +++ b/internal/protocol/store.go @@ -46,7 +46,6 @@ type NodeStore interface { // InmemNodeStore keeps the list of servers in memory. type InmemNodeStore struct { - LeaderTracker mu sync.RWMutex servers []NodeInfo }