Help us shape the future of Go! Take the 2026 Go Developer Survey

daemonpath

package
v0.69.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package daemonpath names the files of the hive daemon for a data directory, so a client finds them without importing the daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSocketDir

func CheckSocketDir(socketPath string) error

CheckSocketDir is the client half of PrepareSocketDir: a client must not send its requests to a socket another user planted in the shared fallback directory. A missing directory passes, since the dial then finds no daemon.

func LockPath

func LockPath(dataDir string) string

LockPath is the single-instance lock for the daemon of dataDir.

func OutLogPath

func OutLogPath(dataDir string) string

OutLogPath is where a detached daemon's stdout and stderr go.

func PrepareSocketDir

func PrepareSocketDir(socketPath string) error

PrepareSocketDir makes the directory a socket lives in. The shared fallback directory must be ours and private: another user who created /tmp/hive-<uid> first could otherwise read the socket's traffic.

func PrivateTempDir added in v0.69.0

func PrivateTempDir() (string, error)

PrivateTempDir is /tmp/hive-<uid>, made and checked as PrepareSocketDir makes it. A path below it is short enough for a unix socket.

func SocketPath

func SocketPath(dataDir string) string

SocketPath is where the daemon for dataDir listens: <dataDir>/hived.sock, or /tmp/hive-<uid>/<hash>.sock when that path is too long for a unix socket. Symlinks are resolved first, so every spelling of one data dir gets the same socket.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL