...

Package config

import "github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config"
Overview
Index

Overview ▾

func ResolveEndpointConfig

func ResolveEndpointConfig(sources []interface{}) (value string, found bool, err error)

ResolveEndpointConfig resolves the endpoint from a list of configuration sources.

func ResolveV1FallbackDisabled

func ResolveV1FallbackDisabled(sources []interface{}) (bool, bool)

ResolveV1FallbackDisabled ...

type ClientEnableState

ClientEnableState provides an enumeration if the client is enabled, disabled, or default behavior.

type ClientEnableState uint

Enumeration values for ClientEnableState

const (
    ClientDefaultEnableState ClientEnableState = iota
    ClientDisabled
    ClientEnabled
)

func ResolveClientEnableState

func ResolveClientEnableState(sources []interface{}) (value ClientEnableState, found bool, err error)

ResolveClientEnableState resolves the ClientEnableState from a list of configuration sources.

type ClientEnableStateResolver

ClientEnableStateResolver is a config resolver interface for retrieving whether the IMDS client is disabled.

type ClientEnableStateResolver interface {
    GetEC2IMDSClientEnableState() (ClientEnableState, bool, error)
}

type EndpointModeResolver

EndpointModeResolver is a config resolver interface for retrieving the EndpointModeState configuration.

type EndpointModeResolver interface {
    GetEC2IMDSEndpointMode() (EndpointModeState, bool, error)
}

type EndpointModeState

EndpointModeState is the EC2 IMDS Endpoint Configuration Mode

type EndpointModeState uint

Enumeration values for ClientEnableState

const (
    EndpointModeStateUnset EndpointModeState = iota
    EndpointModeStateIPv4
    EndpointModeStateIPv6
)

func ResolveEndpointModeConfig

func ResolveEndpointModeConfig(sources []interface{}) (value EndpointModeState, found bool, err error)

ResolveEndpointModeConfig resolves the EndpointModeState from a list of configuration sources.

func (*EndpointModeState) SetFromString

func (e *EndpointModeState) SetFromString(v string) error

SetFromString sets the EndpointModeState based on the provided string value. Unknown values will default to EndpointModeStateUnset

type EndpointResolver

EndpointResolver is a config resolver interface for retrieving the endpoint.

type EndpointResolver interface {
    GetEC2IMDSEndpoint() (string, bool, error)
}