Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/praefect/datastore/repository_store.go')
-rw-r--r--internal/praefect/datastore/repository_store.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/internal/praefect/datastore/repository_store.go b/internal/praefect/datastore/repository_store.go
index 4925fcb50..77dce6ba0 100644
--- a/internal/praefect/datastore/repository_store.go
+++ b/internal/praefect/datastore/repository_store.go
@@ -111,8 +111,6 @@ type RepositoryStore interface {
MarkVirtualStorageUnverified(ctx context.Context, virtualStorage string) (int64, error)
// MarkStorageUnverified marsk all replicas on the storage as unverified.
MarkStorageUnverified(ctx context.Context, virtualStorage, storage string) (int64, error)
- // ListRepositoryPaths retrieves the relative path for all repositories present on the given virtual storage.
- ListRepositoryPaths(ctx context.Context, virtualStorage string) ([]string, error)
}
// PostgresRepositoryStore is a Postgres implementation of RepositoryStore.
@@ -918,28 +916,3 @@ func (rs *PostgresRepositoryStore) GetReplicaPath(ctx context.Context, repositor
return replicaPath, nil
}
-
-// ListRepositoryPaths retrieves the relative path for all repositories present on the given virtual storage.
-func (rs *PostgresRepositoryStore) ListRepositoryPaths(ctx context.Context, virtualStorage string) ([]string, error) {
- rows, err := rs.db.QueryContext(ctx, `
-SELECT relative_path
-FROM repositories
-WHERE virtual_storage = $1
-`, virtualStorage)
- if err != nil {
- return nil, fmt.Errorf("query: %w", err)
- }
- defer rows.Close()
-
- var relativePaths []string
- for rows.Next() {
- var relativePath string
- if err := rows.Scan(&relativePath); err != nil {
- return nil, fmt.Errorf("scan: %w", err)
- }
-
- relativePaths = append(relativePaths, relativePath)
- }
-
- return relativePaths, rows.Err()
-}