endpoints

package
v0.119.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskMetadataEndpointV3EnvVar = "ECS_CONTAINER_METADATA_URI"
	TaskMetadataEndpointV4EnvVar = "ECS_CONTAINER_METADATA_URI_V4"

	TaskMetadataPath      = "/task"
	ContainerMetadataPath = ""
)

Variables

This section is empty.

Functions

func GetTMEFromEnv

func GetTMEFromEnv() (endpoint *url.URL, err error)

GetTMEFromEnv will return the first available task metadata endpoint for the v4 or v3 env var in that order.

func GetTMEV3FromEnv

func GetTMEV3FromEnv() (endpoint *url.URL, err error)

GetTMEV3FromEnv will return a validated task metadata endpoint as obtained by the v3 env var, if any.

func GetTMEV4FromEnv

func GetTMEV4FromEnv() (endpoint *url.URL, err error)

GetTMEV4FromEnv will return a validated task metadata endpoint as obtained by the v4 env var, if any.

Types

type ErrNoTaskMetadataEndpointDetected

type ErrNoTaskMetadataEndpointDetected struct {
	MissingVersion int
	// contains filtered or unexported fields
}

ErrNoTaskMetadataEndpointDetected is a reserved error type to distinguish between incompatible environments and other error scenarios

Jump to

Keyboard shortcuts

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