localstack

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasePath      string = "/etc/localstack/init/ready.d"
	ExposedPort   string = "4566"
	Debug         string = "false"
	DockerHost    string = "unix:///var/run/docker.sock"
	DefaultRegion string = "us-east-1"
)

Variables

This section is empty.

Functions

func BuildEndpoint

func BuildEndpoint(ctx context.Context, container testcontainers.Container, opts ...LocalStackOption) (string, error)

BuildEndpoint returns the endpoint of the LocalStack container

Example: "http://localhost:4566"

func WithLocalStackContainer

func WithLocalStackContainer() container.ContainerOption

Return a new container definition for a LocalStack container with default options:

DockerImage: "localstack/localstack:3.4"
ExposedPort: "4566"

Environment variables:
	DEBUG: false
	DOCKER_HOST: "unix:///var/run/docker.sock"
	DEFAULT_REGION: "us-east-1"

BasePath: "/etc/localstack/init/ready.d"
WaitingForLog: "Initialization complete!"
StartupTimeout: "30 seconds"

Types

type LocalStackOption

type LocalStackOption func(*Options)

LocalStackOption is a type that represents a LocalStack option

func WithDebug

func WithDebug(debug string) LocalStackOption

WithDebug is a LocalStackOption that sets the debug of the LocalStack container

Default: false

func WithDefaultRegion

func WithDefaultRegion(defaultRegion string) LocalStackOption

WithDefaultRegion is a LocalStackOption that sets the default region of the LocalStack container

Default: "us-east-1"

func WithDockerHost

func WithDockerHost(dockerHost string) LocalStackOption

WithDockerHost is a LocalStackOption that sets the Docker host of the LocalStack container

Default: "unix:///var/run/docker.sock"

func WithExposedPort

func WithExposedPort(exposedPort string) LocalStackOption

WithExposedPort is a LocalStackOption that sets the exposed port of the LocalStack container

Default: "4566"

type Options

type Options struct {
	ExposedPort   string
	Debug         string
	DockerHost    string
	DefaultRegion string
}

Options is a type that represents the options for a LocalStack container

Default options:
	ExposedPort: "4566"
	Debug: false
	DockerHost: "unix:///var/run/docker.sock"
	DefaultRegion: "us-east-1"

Jump to

Keyboard shortcuts

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