common

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEndpoint is the default cloudmock gateway endpoint.
	DefaultEndpoint = "http://localhost:4566"

	// DefaultAdminPort is the default admin/health port.
	DefaultAdminPort = 4599

	// DefaultRegion is the default AWS region used with cloudmock.
	DefaultRegion = "us-east-1"

	// DefaultAccessKey is the default AWS access key for cloudmock.
	DefaultAccessKey = "test"

	// DefaultSecretKey is the default AWS secret key for cloudmock.
	DefaultSecretKey = "test"

	// DefaultAccountID is the fake AWS account ID used with cloudmock.
	DefaultAccountID = "000000000000"
)

Variables

This section is empty.

Functions

func AWSEnvVars

func AWSEnvVars(endpoint, region, accessKey, secretKey string) []string

AWSEnvVars returns a slice of environment variable strings that configure AWS CLI tools to point at a cloudmock endpoint.

func DetectEndpoint

func DetectEndpoint() string

DetectEndpoint returns the cloudmock endpoint URL. It checks CLOUDMOCK_ENDPOINT env var first, then falls back to DefaultEndpoint.

func ExecTool

func ExecTool(tool string, args []string, endpoint string) error

ExecTool replaces the current process with the given tool, passing along the provided args and injecting cloudmock-aware environment variables. On Unix systems this uses syscall.Exec for a true exec; on error it falls back to os/exec.

func ExecToolPassthrough

func ExecToolPassthrough(tool string, args []string) error

ExecToolPassthrough execs the tool with the current environment unchanged. Used for --real-aws mode.

func WaitForHealth

func WaitForHealth(endpoint string, timeout time.Duration) error

WaitForHealth polls the cloudmock health endpoint until it responds with 200 or the timeout is reached. It polls every 500ms.

Types

This section is empty.

Jump to

Keyboard shortcuts

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