Documentation
¶
Overview ¶
Package appconfigagent reads configuration from the local AWS AppConfig Agent.
GetConfig calls the Agent or Lambda extension HTTP endpoint. Options supplies application, environment, endpoint, HTTP client and transform settings. Pass the configuration profile name and invocation context on each call.
Retrieval boundary ¶
The Agent owns caching and polling; this adapter does not add a second provider cache. The application deploys and configures the Agent or extension. Local HTTP failures and transform errors are returned to the caller.
Use the sibling appconfig package when calling AppConfig Data directly with an application-owned AWS SDK client.
For usage and compatibility details, see the user guide.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfig ¶
Example ¶
This example requires a configured AppConfig Agent or Lambda extension.
package main
import (
"context"
"time"
"github.com/rambow-cloud/powertools-lambda-go/parameters/appconfigagent"
)
func main() {
value, err := appconfigagent.GetConfig(context.Background(), "features",
appconfigagent.Options{Application: "example", Environment: "development",
Endpoint: "http://localhost:2772", Timeout: time.Second})
if err != nil {
panic(err)
}
_ = value // The Agent owns caching and polling.
}
Output: