configuration

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandCacheConfiguration

func ExpandCacheConfiguration(caches []cache.Cache) ([]cache.Cache, error)

Takes a list of cache configurations and expands them into a list of cache of resolved Cache objects. This does the following:

* Expands cache.Template with the template values from template.json

* Expands cache.Key using templatable arguments (such as id, agent.os, agent.arch, env, checksum etc)

* Expands cache.FallbackKeys using templatable arguments (such as id, agent.os, agent.arch, env, checksum etc)

* Expands cache.Paths using templatable arguments (such as id, agent.os, agent.arch, env, checksum etc)

Uses the OS environment variables for template expansion.

func ExpandCacheConfigurationWithEnv

func ExpandCacheConfigurationWithEnv(caches []cache.Cache, env map[string]string) ([]cache.Cache, error)

ExpandCacheConfigurationWithEnv expands cache configurations using a provided environment map instead of reading from the OS environment. This is useful for library usage where the environment is controlled programmatically.

Parameters:

  • caches: List of cache configurations to expand
  • env: Map of environment variables to use for template expansion

Returns the expanded cache configurations or an error if expansion fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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