summaryrefslogtreecommitdiff
path: root/internal/state/state.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-10-31 11:12:22 +0000
committerLibravatar GitHub <noreply@github.com>2023-10-31 11:12:22 +0000
commitce71a5a7902963538fc54583588850563f6746cc (patch)
tree3e869eba6d25d2db5fe81184ffee595e451b3147 /internal/state/state.go
parent[bugfix] Relax `Mention` parsing, allowing either href or name (#2320) (diff)
downloadgotosocial-ce71a5a7902963538fc54583588850563f6746cc.tar.xz
[feature] add per-uri dereferencer locks (#2291)
Diffstat (limited to 'internal/state/state.go')
-rw-r--r--internal/state/state.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/state/state.go b/internal/state/state.go
index 6ff1baa52..7cd0406b0 100644
--- a/internal/state/state.go
+++ b/internal/state/state.go
@@ -18,6 +18,7 @@
package state
import (
+ "codeberg.org/gruf/go-mutexes"
"github.com/superseriousbusiness/gotosocial/internal/cache"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/storage"
@@ -41,6 +42,11 @@ type State struct {
// DB provides access to the database.
DB db.DB
+ // FedLocks provides access to this state's mutex map
+ // of per URI federation locks. Used during dereferencing
+ // and by the go-fed/activity library.
+ FedLocks mutexes.MutexMap
+
// Storage provides access to the storage driver.
Storage *storage.Driver