metadata

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package metadata retrieves Lambda execution-environment metadata on demand.

Index

Constants

View Source
const Path = "/2026-01-15/metadata/execution-environment"

Variables

This section is empty.

Functions

func ClearMetadataCache

func ClearMetadataCache()

func GetMetadata

func GetMetadata(ctx context.Context, options ...Options) (map[string]any, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *Client

func (*Client) ClearCache

func (c *Client) ClearCache()

func (*Client) Get

func (c *Client) Get(ctx context.Context, options ...Options) (map[string]any, error)

type Config

type Config struct {
	// Endpoint explicitly enables local HTTP access outside Lambda.
	Endpoint   string
	Token      string
	HTTPClient *http.Client
}

type Error

type Error struct {
	StatusCode int
	Err        error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Options

type Options struct{ Timeout time.Duration }

Jump to

Keyboard shortcuts

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