utils

package
v0.3.2-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 5 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 GetSessionTempDirCount

func GetSessionTempDirCount() int

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

func MustGetPlaygroundTempDir

func MustGetPlaygroundTempDir() string

MustGetPlaygroundTempDir creates the temp dir for

func MustGetTempSessionDir

func MustGetTempSessionDir(sessionID string) string

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

func MustGetVolumeDir

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

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