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

storagepath

package
v0.57.13 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineConfigDir

func DetermineConfigDir(projectID string) (string, error)

DetermineConfigDir determines the root config and storage dir.

func DetermineStorageRoot

func DetermineStorageRoot(projectID string) (string, error)

DetermineStorageRoot determines the root dir to store data.

The resolved state path takes precedence over the data directory so every component of one invocation (stores, logs, and helpers) shares the root the CLI selected. Without either override the platform config dir is used.

func LogLevelEnvVar added in v0.51.2

func LogLevelEnvVar(projectID string) string

LogLevelEnvVar returns the environment variable that overrides the log level for the given project (e.g. "spacewave" -> "SPACEWAVE_LOG_LEVEL").

func LogRetentionDaysEnvVar added in v0.51.2

func LogRetentionDaysEnvVar(projectID string) string

LogRetentionDaysEnvVar returns the environment variable that overrides the on-disk log retention duration (in days) for the given project.

func ResolveStatePath

func ResolveStatePath(projectID, statePath, socketPath string, explicit bool) (string, error)

ResolveStatePath makes statePath absolute and creates it. When explicit is set, it publishes the root with the optional explicit socket path to the project's environment variables. Logs, bus-hosted components, and child processes then scope their default paths to the chosen state root instead of the shared process default. A default state path is not published, so the environment still tells subcommands whether the user chose one; the unpublished default is the root DetermineStorageRoot resolves anyway. socketPath may be empty when no explicit socket path was requested. Returns the absolute state root.

func SocketPathEnvVar added in v0.57.0

func SocketPathEnvVar(projectID string) string

SocketPathEnvVar returns the environment variable that overrides the daemon socket path (e.g. "spacewave" -> "SPACEWAVE_SOCKET_PATH").

func StatePathEnvVar added in v0.57.0

func StatePathEnvVar(projectID string) string

StatePathEnvVar returns the environment variable that carries the resolved project state path (e.g. "spacewave" -> "SPACEWAVE_STATE_PATH").

func StorageRootEnvVar

func StorageRootEnvVar(projectID string) string

StorageRootEnvVar returns the environment variable for the storage root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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