diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-12 16:17:29 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-12 16:17:29 +0300 |
commit | b60ee3425b4b6d54154de1629075b52b8599d869 (patch) | |
tree | a96eae38f4427a45bdbe00af0dbc39656871e001 /internal/source/gitlab/cache/store.go | |
parent | 4e0be9393f33d27ea381cae3e6a6aeda88032153 (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.go | 9 |
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 +} |