config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package config contains environment variables and default values for Local Endpoints

Index

Constants

View Source
const (
	// PortVar defines the port that metadata and credentials listen at
	PortVar = "ECS_LOCAL_METADATA_PORT"

	// Metadata related
	ClusterARNVar            = "CLUSTER_ARN"
	TaskARNVar               = "TASK_ARN"
	TDFamilyVar              = "TASK_DEFINITION_FAMILY"
	TDRevisionVar            = "TASK_DEFINITION_REVISION"
	ContainerInstanceTagsVar = "CONTAINER_INSTANCE_TAGS"
	TaskTagsVar              = "TASK_TAGS_VAR"

	// Custom endpoint related
	IAMCustomEndpointVar = "IAM_ENDPOINT"
	STSCustomEndpointVar = "STS_ENDPOINT"

	// Shared credentials default expiration value when a token is detected.
	SharedTokenExpirationVar = "SHARED_TOKEN_EXPIRATION"

	// User-defined, static metadata that overrides/augments the normal response
	ContainerMetadataPathVar = "CONTAINER_METADATA_PATH"
	TaskMetadataPathVar      = "TASK_METADATA_PATH"
)

Environment Variables

View Source
const (
	// DefaultPort is the default port the server listens at
	DefaultPort = "80"

	// Metadata related
	DefaultContainerType = "NORMAL"
	DefaultClusterName   = "ecs-local-cluster"
	DefaultTaskARN       = "arn:aws:ecs:us-west-2:111111111111:task/ecs-local-cluster/37e873f6-37b4-42a7-af47-eac7275c6152"
	DefaultTDFamily      = "esc-local-task-definition"
	DefaultTDRevision    = "1"

	// Expire shared credentials with a token in 12.5 minutes.
	DefaultSharedTokenExpiration = 750
)

Defaults

View Source
const (
	// RoleCredentialsPath is the path for obtaining credentials from a role
	RoleCredentialsPath = "/role/{role}"
	// RoleCredentialsPathWithSlash adds a trailing slash
	RoleCredentialsPathWithSlash = RoleCredentialsPath + "/"

	//RoleArnCredentialsPath is the path for obtaining credentials from a role ARN
	RoleArnCredentialsPath = "/role-arn/{roleArn}/{roleName}"
	// RoleArnCredentialsPathWithSlash adds a trailing slash
	RoleArnCredentialsPathWithSlash = RoleArnCredentialsPath + "/"

	// TempCredentialsPath is the path for obtaining temp creds from sts:GetSessionsToken
	TempCredentialsPath = "/creds"
	// TempCredentialsPathWithSlash adds a trailing slash
	TempCredentialsPathWithSlash = TempCredentialsPath + "/"
)

Credentials

View Source
const (
	// V3ContainerMetadataPath is the path for V3 container metadata
	V3ContainerMetadataPath = "/v3"
	// V3ContainerMetadataPathWithSlash adds a trailing slash
	V3ContainerMetadataPathWithSlash = V3ContainerMetadataPath + "/"
	// V3ContainerMetadataPathWithIdentifier is the V3 container metadata path with an identifer specified
	V3ContainerMetadataPathWithIdentifier = "/v3/containers/{identifier}"
	// V3ContainerMetadataPathWithIdentifierAndSlash adds a trailing slash
	V3ContainerMetadataPathWithIdentifierAndSlash = V3ContainerMetadataPathWithIdentifier + "/"

	// V3ContainerStatsPath is the path for V3 container stats
	V3ContainerStatsPath = "/v3/stats"
	// V3ContainerStatsPathWithSlash adds a trailing slash
	V3ContainerStatsPathWithSlash = V3ContainerStatsPath + "/"
	// V3ContainerStatsPathWithIdentifier is the V3 container stats path with an identifier
	V3ContainerStatsPathWithIdentifier = "/v3/containers/{identifier}/stats"
	// V3ContainerStatsPathWithIdentifierAndSlash adds a trailing slash
	V3ContainerStatsPathWithIdentifierAndSlash = V3ContainerStatsPathWithIdentifier + "/"

	// V3TaskMetadataPath is the path for V3 task metadata
	V3TaskMetadataPath = "/v3/task"
	// V3TaskMetadataPathWithSlash adds a trailing slash
	V3TaskMetadataPathWithSlash = V3TaskMetadataPath + "/"
	// V3TaskMetadataPathWithIdentifier is the v3 task metadata path with an identifier
	V3TaskMetadataPathWithIdentifier = "/v3/containers/{identifier}/task"
	// V3TaskMetadataPathWithIdentifierWithSlash adds a trailing slash
	V3TaskMetadataPathWithIdentifierWithSlash = V3TaskMetadataPathWithIdentifier + "/"

	// V3TaskStatsPath is the path for V3 task stats
	V3TaskStatsPath = "/v3/task/stats"
	// V3TaskStatsPathWithSlash adds a trailing slash
	V3TaskStatsPathWithSlash = V3TaskStatsPath + "/"
	// V3TaskStatsPathWithIdentifier is the v3 task stats path with an identifier
	V3TaskStatsPathWithIdentifier = "/v3/containers/{identifier}/task/stats"
	// V3TaskStatsPathWithIdentifierAndSlash adds a trailing slash
	V3TaskStatsPathWithIdentifierAndSlash = V3TaskStatsPathWithIdentifier + "/"
)

V3

View Source
const (
	// V2TaskMetadataPath is the V2 Task Metadata path
	V2TaskMetadataPath = "/v2/metadata"
	// V2TaskMetadataPathWithSlash adds a trailing slash
	V2TaskMetadataPathWithSlash = V2TaskMetadataPath + "/"

	// V2ContainerMetadataPath is the V2 Container Metadata path
	V2ContainerMetadataPath = "/v2/metadata/{identifier}"
	// V2ContainerMetadataPathWithSlash adds a trailing slash
	V2ContainerMetadataPathWithSlash = V2ContainerMetadataPath + "/"

	// V2TaskStatsPath is the V2 Task Stats Path
	V2TaskStatsPath = "/v2/stats"
	// V2TaskStatsPathWithSlash adds a trailing slash
	V2TaskStatsPathWithSlash = V2TaskStatsPath + "/"

	// V2ContainerStatsPath is the V2 container stats path
	V2ContainerStatsPath = "/v2/stats/{identifier}"
	// V2ContainerStatsPathWithSlash adds a trailing slash
	V2ContainerStatsPathWithSlash = V2ContainerStatsPath + "/"
)

V2

View Source
const (
	HTTPTimeoutDuration = "5s"
)

Settings

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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