workspace

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package workspace provides isolated directories for parallel bench jobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RewriteNamespace

func RewriteNamespace(dir string, oldNS, newNS string) error

RewriteNamespace replaces all occurrences of oldNS with newNS in YAML and shell files under dir. This enables parallel execution where each worker uses its own namespace.

Types

type Workspace

type Workspace struct {
	Root         string
	ScenariosDir string
	RunsDir      string
	EvidenceDir  string
}

Workspace provides an isolated directory for a single bench job. Scenarios and supporting directories (manifests, charts) are copied so agent writes never touch the source repo.

func New

func New(jobID string, srcScenariosDir string) (*Workspace, error)

New creates an isolated workspace for the given job ID. Copies srcScenariosDir and sibling directories (manifests/, charts/) into the workspace so relative paths (../../../manifests/) resolve correctly. The caller must call Cleanup when done to remove the temp directory.

func (*Workspace) Cleanup

func (ws *Workspace) Cleanup()

Cleanup removes the entire workspace directory.

Jump to

Keyboard shortcuts

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