aboutsummaryrefslogtreecommitdiff
path: root/internal/service/gallery.go
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-14 10:57:01 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-14 10:57:01 +0530
commitad97c2f3222dcdb8c124747feb4564ca9069fa1e (patch)
tree7bbd6fb8551456529a0ca28121821c3f5fa431e5 /internal/service/gallery.go
parent826434a8597122847f643abe835d5c6e5dd74c4c (diff)
downloadgalleryd-ad97c2f3222dcdb8c124747feb4564ca9069fa1e.tar.xz
galleryd-ad97c2f3222dcdb8c124747feb4564ca9069fa1e.zip
refactor(service): synchronize gallery access
Diffstat (limited to 'internal/service/gallery.go')
-rw-r--r--internal/service/gallery.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/service/gallery.go b/internal/service/gallery.go
index 30abefe..67d0106 100644
--- a/internal/service/gallery.go
+++ b/internal/service/gallery.go
@@ -1,6 +1,8 @@
package service
import (
+ "sync"
+
"github.com/RanXom/galleryd/internal/gallery"
"github.com/RanXom/galleryd/internal/scanner"
)
@@ -10,5 +12,7 @@ type galleryService struct {
scanner *scanner.Scanner
builder *gallery.Builder
+ mu sync.RWMutex
+
index galleryIndex
}