Documentation
¶
Overview ¶
Package tool contains shared process, file and JSON primitives used by the three public commands.
Index ¶
- func AbsoluteExecutable(name string) (string, error)
- func Array(v any) []any
- func CopyFile(source, target string) error
- func CopySaved(source, target string) error
- func CopyTree(source, target string) error
- func CreateOutput(path, mode string) (string, error)
- func DataDir() (string, error)
- func DigestBytes(data []byte) string
- func FileDigest(path string) (string, error)
- func OutputBase(mode string) (string, error)
- func ReadJSON(path string, v any) error
- func RunPeer(o PeerOptions) (runErr error)
- func Str(v any) string
- func Strings(v any) []string
- func ValidateCommand(value string) (string, error)
- func WaitDriver(ctx context.Context, cmd *exec.Cmd, started ...func(int) error) (runErr error)
- func WaitProcessGroup(pid int) error
- func WriteFiles(root string, files Object) error
- func WriteJSON(path string, v any) error
- type Command
- type Object
- type PeerOptions
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsoluteExecutable ¶
func CreateOutput ¶
CreateOutput returns a new attempt directory. Existing paths are never overwritten because failed attempts are evidence too.
func DataDir ¶
DataDir is the single owner of persistent tool data. Attempts and private archives are siblings rather than copies of the same environment logic.
func DigestBytes ¶
func FileDigest ¶
func OutputBase ¶
func RunPeer ¶
func RunPeer(o PeerOptions) (runErr error)
func ValidateCommand ¶
ValidateCommand resolves a caller-selected absolute executable without PATH lookup.
func WaitDriver ¶
WaitDriver owns the process group so cancellation also reaps descendants.
func WaitProcessGroup ¶
WaitProcessGroup confirms that even descendants abandoned by an SDK have stopped. A surviving group leaves the official reservation intact.
func WriteFiles ¶
Types ¶
type Object ¶
Object is the lossless-enough JSON object shape used between stages. Native protocol bytes stay in internal/protocol/recording and are never rebuilt here.