Documentation
¶
Overview ¶
Package paths centralizes the local API file names so the server and the CLI client agree without the client importing the server package (which would pull node internals into the thin client).
Index ¶
Constants ¶
const ( // SocketFileName is the UDS path inside the data directory. SocketFileName = "api.sock" // TokenFileName is the bearer token path inside the data directory. TokenFileName = "api.token" // EndpointFileName is the optional loopback-TCP discovery document. EndpointFileName = "api.endpoint.json" // DarwinSocketPathLimit is the longest usable sockaddr_un.sun_path value on // macOS: the 104-byte field includes the terminating NUL. DarwinSocketPathLimit = 103 // LinuxSocketPathLimit is the longest usable sockaddr_un.sun_path value on // Linux: the 108-byte field includes the terminating NUL. LinuxSocketPathLimit = 107 )
Variables ¶
This section is empty.
Functions ¶
func EndpointPath ¶
EndpointPath returns <dataDir>/api.endpoint.json.
func SocketPathLimit ¶
func SocketPathLimit() int
SocketPathLimit returns the platform's sockaddr_un.sun_path limit.
func ValidateSocketPath ¶
ValidateSocketPath rejects a UDS path the kernel cannot represent. The error names the path, its byte length, the platform limit and the fix so callers do not surface the opaque "connect: invalid argument" failure.
Types ¶
This section is empty.