aboutsummaryrefslogtreecommitdiff
path: root/pkg/mountmanager/socket.go
diff options
context:
space:
mode:
author泽淼 周 <zhouzemiao@ihuman.com>2025-09-26 19:54:44 +0800
committerChris Lu <chrislusf@users.noreply.github.com>2025-12-06 18:53:22 -0800
commit2828d5a05c36aa8719778142eb4472007906f14c (patch)
tree7a60daa0bc9cf86204ddeddc94bc7dc748483cb5 /pkg/mountmanager/socket.go
parentfd2b35494095ccf7b06fb210305406f83ed17998 (diff)
downloadseaweedfs-csi-driver-2828d5a05c36aa8719778142eb4472007906f14c.tar.xz
seaweedfs-csi-driver-2828d5a05c36aa8719778142eb4472007906f14c.zip
feat: Separated weed mount lifecycle into a dedicated service and rewired the CSI components to call it.
Diffstat (limited to 'pkg/mountmanager/socket.go')
-rw-r--r--pkg/mountmanager/socket.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/mountmanager/socket.go b/pkg/mountmanager/socket.go
new file mode 100644
index 0000000..bd63146
--- /dev/null
+++ b/pkg/mountmanager/socket.go
@@ -0,0 +1,16 @@
+package mountmanager
+
+import (
+ "fmt"
+
+ "github.com/seaweedfs/seaweedfs/weed/util"
+)
+
+// LocalSocketPath returns the unix socket path used to communicate with the weed mount process.
+func LocalSocketPath(volumeID string) string {
+ hash := util.HashToInt32([]byte(volumeID))
+ if hash < 0 {
+ hash = -hash
+ }
+ return fmt.Sprintf("/tmp/seaweedfs-mount-%d.sock", hash)
+}