aboutsummaryrefslogtreecommitdiff
path: root/pkg/mountmanager/socket.go
blob: bd63146ece4e538b461e23e7de5a651da5bfc726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
}