utils

package
v0.3.2-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePetName

func GeneratePetName() string

GeneratePetName generates a random pet name like perfect-bee. These names are useful as human friendly identifiers.

func GetLogsDir added in v0.3.2

func GetLogsDir() (string, error)

GetLogsDir returns the directory where service logs are stored. Returns <PlaygroundDir>/devnet/logs

func GetPlaygroundDir added in v0.3.2

func GetPlaygroundDir() (string, error)

GetPlaygroundDir returns the base directory for builder-playground state. It follows XDG Base Directory Specification, defaulting to ~/.local/state/builder-playground.

func GetSessionTempDirCount added in v0.3.2

func GetSessionTempDirCount() int

GetSessionTempDirCount returns the number of session directories under the playground temp dir.

func MustGetPlaygroundTempDir added in v0.3.2

func MustGetPlaygroundTempDir() string

MustGetPlaygroundTempDir creates the temp dir for

func MustGetTempSessionDir added in v0.3.2

func MustGetTempSessionDir(sessionID string) string

MustGetSessionTempDir creates and returns the temp dir for the session under the temp playground dir.

func MustGetVolumeDir added in v0.3.2

func MustGetVolumeDir(sessionID, volumeName string) string

MustGetVolumeDir creates and returns the temp dir for bind mount volumes under the temp session dir.

func StartTimer

func StartTimer(name string) func()

StartTimer starts a timer with the given name and returns a function that prints the elapsed time when called. The elapsed time is only printed if debug or trace levels are used.

func TempPlaygroundDirPath added in v0.3.2

func TempPlaygroundDirPath() string

TempPlaygroundDirPath returns the temp playground dir path.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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