summaryrefslogtreecommitdiff
path: root/vendor/codeberg.org/gruf/go-store/kv/state.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-16 18:52:30 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-16 18:52:30 +0100
commit6f5ccf435585e43a00e3cc50f4bcefac36ada818 (patch)
treeba368d27464b79b1e5d010c0662fd3e340bf108e /vendor/codeberg.org/gruf/go-store/kv/state.go
parentadd go-runners to readme (diff)
downloadgotosocial-6f5ccf435585e43a00e3cc50f4bcefac36ada818.tar.xz
update dependencies
Diffstat (limited to 'vendor/codeberg.org/gruf/go-store/kv/state.go')
-rw-r--r--vendor/codeberg.org/gruf/go-store/kv/state.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/codeberg.org/gruf/go-store/kv/state.go b/vendor/codeberg.org/gruf/go-store/kv/state.go
index 20a3e951d..330928bce 100644
--- a/vendor/codeberg.org/gruf/go-store/kv/state.go
+++ b/vendor/codeberg.org/gruf/go-store/kv/state.go
@@ -30,7 +30,7 @@ func (st *StateRO) Get(key string) ([]byte, error) {
}
// Pass request to store
- return st.store.get(key)
+ return st.store.get(st.store.mutexMap.RLock, key)
}
func (st *StateRO) GetStream(key string) (io.ReadCloser, error) {
@@ -44,7 +44,7 @@ func (st *StateRO) GetStream(key string) (io.ReadCloser, error) {
}
// Pass request to store
- return st.store.getStream(key)
+ return st.store.getStream(st.store.mutexMap.RLock, key)
}
func (st *StateRO) Has(key string) (bool, error) {
@@ -58,7 +58,7 @@ func (st *StateRO) Has(key string) (bool, error) {
}
// Pass request to store
- return st.store.has(key)
+ return st.store.has(st.store.mutexMap.RLock, key)
}
func (st *StateRO) Release() {
@@ -94,7 +94,7 @@ func (st *StateRW) Get(key string) ([]byte, error) {
}
// Pass request to store
- return st.store.get(key)
+ return st.store.get(st.store.mutexMap.RLock, key)
}
func (st *StateRW) GetStream(key string) (io.ReadCloser, error) {
@@ -108,7 +108,7 @@ func (st *StateRW) GetStream(key string) (io.ReadCloser, error) {
}
// Pass request to store
- return st.store.getStream(key)
+ return st.store.getStream(st.store.mutexMap.RLock, key)
}
func (st *StateRW) Put(key string, value []byte) error {
@@ -122,7 +122,7 @@ func (st *StateRW) Put(key string, value []byte) error {
}
// Pass request to store
- return st.store.put(key, value)
+ return st.store.put(st.store.mutexMap.Lock, key, value)
}
func (st *StateRW) PutStream(key string, r io.Reader) error {
@@ -136,7 +136,7 @@ func (st *StateRW) PutStream(key string, r io.Reader) error {
}
// Pass request to store
- return st.store.putStream(key, r)
+ return st.store.putStream(st.store.mutexMap.Lock, key, r)
}
func (st *StateRW) Has(key string) (bool, error) {
@@ -150,7 +150,7 @@ func (st *StateRW) Has(key string) (bool, error) {
}
// Pass request to store
- return st.store.has(key)
+ return st.store.has(st.store.mutexMap.RLock, key)
}
func (st *StateRW) Delete(key string) error {
@@ -164,7 +164,7 @@ func (st *StateRW) Delete(key string) error {
}
// Pass request to store
- return st.store.delete(key)
+ return st.store.delete(st.store.mutexMap.Lock, key)
}
func (st *StateRW) Release() {