diff --git a/entry.go b/entry.go deleted file mode 100644 index 2ddea9b..0000000 --- a/entry.go +++ /dev/null @@ -1,13 +0,0 @@ -package sturdyc - -import "time" - -// entry represents a single cache entry. -type entry[T any] struct { - key string - value T - expiresAt time.Time - refreshAt time.Time - numOfRefreshRetries int - isMissingRecord bool -} diff --git a/shard.go b/shard.go index f3813bf..c39c6a5 100644 --- a/shard.go +++ b/shard.go @@ -6,6 +6,16 @@ import ( "time" ) +// entry represents a single cache entry. +type entry[T any] struct { + key string + value T + expiresAt time.Time + refreshAt time.Time + numOfRefreshRetries int + isMissingRecord bool +} + // shard is a thread-safe data structure that holds a subset of the cache entries. type shard[T any] struct { sync.RWMutex