remote_build_helpers

package
v5.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TempFileManager

type TempFileManager struct {
	// contains filtered or unexported fields
}

TempFileManager manages temporary files created during image build. It maintains a list of created temporary files and provides cleanup functionality to ensure proper resource management.

func NewTempFileManager

func NewTempFileManager() *TempFileManager

func (*TempFileManager) AddFile

func (t *TempFileManager) AddFile(filename string)

func (*TempFileManager) Cleanup

func (t *TempFileManager) Cleanup()

func (*TempFileManager) CreateTempFileFromReader

func (t *TempFileManager) CreateTempFileFromReader(dest string, pattern string, reader io.Reader) (string, error)

CreateTempFileFromReader creates a temporary file in the specified destination directory with the given pattern, and copies content from the provided reader into the file. The created temporary file is automatically added to the manager's cleanup list.

Parameters:

  • dest: The directory where the temporary file should be created
  • pattern: The pattern for naming the temporary file
  • reader: The io.Reader from which to read content to write into the temporary file

Returns:

  • string: The path to the created temporary file
  • error: Any error encountered during the operation

func (*TempFileManager) CreateTempSecret

func (t *TempFileManager) CreateTempSecret(secretPath, contextDir string) (string, error)

CreateTempSecret creates a temporary copy of a secret file in the specified context directory. The original secret file is copied to a new temporary file which is automatically added to the manager's cleanup list.

Parameters:

  • secretPath: The path to the source secret file to copy
  • contextDir: The directory where the temporary secret file should be created

Returns:

  • string: The path to the created temporary secret file
  • error: Any error encountered during the operation

Jump to

Keyboard shortcuts

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