endpoint

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DNSRebindNote = "Could not resolve localhost.localstack.cloud, falling back to 127.0.0.1."
View Source
const Hostname = "localhost.localstack.cloud"

Variables

This section is empty.

Functions

func ResolveHost

func ResolveHost(ctx context.Context, port, override string) (host string, dnsOK bool)

ResolveHost returns the best host:port for reaching LocalStack on the given port. If override is non-empty it is returned as-is. Otherwise a DNS check is performed; if Hostname does not resolve to 127.0.0.1 (e.g. DNS rebind protection is active), it falls back to 127.0.0.1 directly.

func S3Addressing added in v0.13.0

func S3Addressing(endpointURL string) (pathStyle bool, s3Endpoint string)

S3Addressing decides S3 path-style and the S3 endpoint for the given base endpoint. Virtual-host-style addressing (used by *.localstack.cloud hosts) places the bucket as a subdomain of the S3 endpoint host, so the S3 endpoint host carries an `s3.` prefix and path style is off. Non-domain hosts (127.0.0.1/localhost) require path style and use the bare endpoint.

It is used both by the Terraform proxy (to set `s3_use_path_style` and the `s3` endpoint key in the generated override) and by the CDK proxy (to set `AWS_ENDPOINT_URL_S3`). CDK has no env-only lever for path style, so a pathStyle==true result there is informational only — see the cdk-proxy design.

Types

This section is empty.

Jump to

Keyboard shortcuts

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