aboutsummaryrefslogtreecommitdiff
path: root/pkg/mountmanager/types.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/types.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/types.go')
-rw-r--r--pkg/mountmanager/types.go49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkg/mountmanager/types.go b/pkg/mountmanager/types.go
new file mode 100644
index 0000000..37f791f
--- /dev/null
+++ b/pkg/mountmanager/types.go
@@ -0,0 +1,49 @@
+package mountmanager
+
+// MountRequest contains all information needed to start a weed mount process.
+type MountRequest struct {
+ VolumeID string `json:"volumeId"`
+ TargetPath string `json:"targetPath"`
+ ReadOnly bool `json:"readOnly"`
+ Filers []string `json:"filers"`
+ CacheDir string `json:"cacheDir"`
+ CacheCapacityMB int `json:"cacheCapacityMB"`
+ ConcurrentWriters int `json:"concurrentWriters"`
+ UidMap string `json:"uidMap"`
+ GidMap string `json:"gidMap"`
+ DataCenter string `json:"dataCenter"`
+ DataLocality string `json:"dataLocality"`
+ VolumeContext map[string]string `json:"volumeContext"`
+}
+
+// MountResponse is returned after a successful mount request.
+type MountResponse struct {
+ LocalSocket string `json:"localSocket"`
+}
+
+// UnmountRequest contains the information needed to stop a weed mount process.
+type UnmountRequest struct {
+ VolumeID string `json:"volumeId"`
+}
+
+// UnmountResponse is the response of a successful unmount request.
+type UnmountResponse struct{}
+
+// ConfigureRequest adjusts the behaviour of an existing mount.
+type ConfigureRequest struct {
+ VolumeID string `json:"volumeId"`
+ CollectionCapacity int64 `json:"collectionCapacity"`
+}
+
+// ConfigureResponse represents a successful configure call.
+type ConfigureResponse struct{}
+
+// ErrorResponse is returned when the mount service encounters a failure.
+type ErrorResponse struct {
+ Error string `json:"error"`
+}
+
+const (
+ // DefaultWeedBinary is the default executable name used to spawn weed mount processes.
+ DefaultWeedBinary = "weed"
+)