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

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-12 16:17:29 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-12 16:17:29 +0300
commitb60ee3425b4b6d54154de1629075b52b8599d869 (patch)
treea96eae38f4427a45bdbe00af0dbc39656871e001 /internal/source/gitlab/cache/store.go
parent4e0be9393f33d27ea381cae3e6a6aeda88032153 (diff)
Refactor gitlab source cache to make it more thread safe
Diffstat (limited to 'internal/source/gitlab/cache/store.go')
-rw-r--r--internal/source/gitlab/cache/store.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/source/gitlab/cache/store.go b/internal/source/gitlab/cache/store.go
new file mode 100644
index 00000000..18ffb3ea
--- /dev/null
+++ b/internal/source/gitlab/cache/store.go
@@ -0,0 +1,9 @@
+package cache
+
+import "context"
+
+// Store defines an interface describing an abstract cache store
+type Store interface {
+ LoadOrCreate(ctx context.Context, domain string) *Entry
+ ReplaceOrCreate(ctx context.Context, domain string) *Entry
+}