From 815a5165ee6ff971da5e7e8b606534a4a3b885ea Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Sun, 18 Aug 2024 22:36:34 -0700 Subject: [PATCH] Moving TTLMap and PersistedMap into `/lib/storage` (#472) --- lib/{ => storage}/persistedmap/persistedmap.go | 0 lib/{ => storage}/persistedmap/persistedmap_test.go | 0 lib/{ => storage}/ttlmap/ttlmap.go | 0 lib/{ => storage}/ttlmap/ttlmap_test.go | 0 sources/dynamodb/offsets/offsets.go | 2 +- sources/mongo/streaming.go | 2 +- 6 files changed, 2 insertions(+), 2 deletions(-) rename lib/{ => storage}/persistedmap/persistedmap.go (100%) rename lib/{ => storage}/persistedmap/persistedmap_test.go (100%) rename lib/{ => storage}/ttlmap/ttlmap.go (100%) rename lib/{ => storage}/ttlmap/ttlmap_test.go (100%) diff --git a/lib/persistedmap/persistedmap.go b/lib/storage/persistedmap/persistedmap.go similarity index 100% rename from lib/persistedmap/persistedmap.go rename to lib/storage/persistedmap/persistedmap.go diff --git a/lib/persistedmap/persistedmap_test.go b/lib/storage/persistedmap/persistedmap_test.go similarity index 100% rename from lib/persistedmap/persistedmap_test.go rename to lib/storage/persistedmap/persistedmap_test.go diff --git a/lib/ttlmap/ttlmap.go b/lib/storage/ttlmap/ttlmap.go similarity index 100% rename from lib/ttlmap/ttlmap.go rename to lib/storage/ttlmap/ttlmap.go diff --git a/lib/ttlmap/ttlmap_test.go b/lib/storage/ttlmap/ttlmap_test.go similarity index 100% rename from lib/ttlmap/ttlmap_test.go rename to lib/storage/ttlmap/ttlmap_test.go diff --git a/sources/dynamodb/offsets/offsets.go b/sources/dynamodb/offsets/offsets.go index 721a38f9..7aef91c1 100644 --- a/sources/dynamodb/offsets/offsets.go +++ b/sources/dynamodb/offsets/offsets.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/artie-labs/reader/lib/ttlmap" + "github.com/artie-labs/reader/lib/storage/ttlmap" ) // ShardExpirationAndBuffer - Buffer for when a shard is closed as the records have a TTL of 24h. However, garbage collection is async. diff --git a/sources/mongo/streaming.go b/sources/mongo/streaming.go index deb9834f..32b8fe03 100644 --- a/sources/mongo/streaming.go +++ b/sources/mongo/streaming.go @@ -14,7 +14,7 @@ import ( "github.com/artie-labs/reader/config" "github.com/artie-labs/reader/lib" "github.com/artie-labs/reader/lib/iterator" - "github.com/artie-labs/reader/lib/persistedmap" + "github.com/artie-labs/reader/lib/storage/persistedmap" ) const offsetKey = "offset"